Paulo,
Thanks. Can you try the command "imqcmd list dst" next time the problem occurs? By default, username admin password
admin works.
You say "a lot of message comes in few seconds". Does this mean that there are periods of time when no new messages are
being sent to the topic?
If so then my suspicion (and it is just a suspicion) is that the reason you are seeing one server becoming idle despite
there being unconsumed messages may be that they have all been pre-sent to other servers. By default, the MQ broker
pre-sends messages to a given server in blocks of up to 1000 messages. These messages are then held in memory prior to
delivery to the MDB. This is done for performance under steady load. However if the load is sporadic this can lead to
circumstances in which one server grabs all the messages (even if it hasn't yet processed them) and leaves another
server with nothing to do.
I wrote a (lengthy) blog posting about this situation, and how to overcome it, at
http://openmessaging.blogspot.com/2009/03/consumer-flow-control-and-message.html
Nigel
Paulo Cesar Reis wrote:
> Hi Nigel,
>
> My application is a J2EE App that contains message producers (EJB's) and
> messages consumers. Message consumers 're typically MDB's. The problem
> happens when a lot of message comes in few seconds, like 2thousands in one
> second. All my MDB'S 're configured as durable. Yesterday, after a lot of
> problem, we decided to move to another machine with a fresh installation of
> glassfish, its seems the problem disappear, today we got no problem so far.
> I believe the default settings for a destination is to be persistent or Am I
> wrong? I did not modify this.
>
> When I changed to embedded mode I got warnings like these:
>
> [#|2009-10-04T14:31:33.702-0300|WARNING|sun-appserver2.1|javax.jms.Connectio
> n.mqjmsra|_ThreadID=120;_ThreadName=Timer-11;_RequestID=f9461222-86bd-44a0-a
> 47b-2ac5ad5ce196;|MQJMSRA_DC2001:
> connectionId=618721721118128640:_destroy():called on a connection that was
> not closed.|#]
>
> [#|2009-10-04T14:41:28.288-0300|WARNING|sun-appserver2.1|javax.resourceadapt
> er.mqjmsra.outbound.connection|_ThreadID=120;_ThreadName=Timer-11;_RequestID
> =f9461222-86bd-44a0-a47b-2ac5ad5ce196;|MQJMSRA_MC2001: createConnection API
> used w/ username, password for Container Auth|#]
>
>
> I got a lot of those, spamming my log file. The message below I got only few
> times, not on a sequence:
>
> [#|2009-10-04T11:43:09.770-0300|WARNING|sun-appserver2.1|javax.jms|_ThreadID
> =313;_ThreadName=iMQReadChannel-2557;_RequestID=6d8fa5cf-1e93-4674-bae8-9492
> 657498f8;|[I500]: Caught JVM Exception: java.io.EOFException|#]
>
> I did not get any errors messages only warnings.
>
> About the command " imqcmd list dst " I'm not using any defined
> username/password so I should use the username guest with wich password? Im
> following the default settings here again.
>
> The version of GF:
> sh asadmin version
> Unable to communicate with admin server, getting version locally.
> Version = Sun GlassFish Enterprise Server v2.1
> Command version executed successfully.
>
> Follow an example how I send messages to topic:
>
> @Resource(mappedName="jms/NPMessageReceiverConnectionFactory")
> private ConnectionFactory conFactory;
>
> @Resource(mappedName="jms/NPMessageReceiverTopic")
> private Topic messageTopic;
>
> private void broadcastJMSMessage(NPMessage message) throws
> JMSException {
> // dispatch jms message
> // send to the target modules
> // they should be able to handle and send the messages to
> message-sender module
> Connection connection = null;
> try {
> connection =
> this.getConFactory().createConnection();
> Session session =
> connection.createSession(true, 0);
> MessageProducer producer =
>
> session.createProducer(this.getMessageTopic());
> Message msg =
> session.createMessage();
> msg.setLongProperty("messageID", message.getId());
> msg.setStringProperty("messageXML",
> message.getMessage());
> producer.send(msg);
> producer.close();
> connection.close();
> this.getLogger().debug("[MessageReceiverBean] ::
> Message ("+msg+") was sent successful via JMS. Others middle-ware
> applications should care about the next steps...");
> } catch (JMSException e) {
> if(null != connection)
> try {
> connection.close();
> } catch(Exception e1) {}
>
> throw e;
> }
> }
>
>
>
> Thanks.
>
>
> On 10/6/09 6:24 AM, "Nigel Deakin" <Nigel.Deakin_at_Sun.COM> wrote:
>
>> imqcmd list dst
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>