Cannot receive paged message
cornhoolio22 Jul 21, 2014 2:11 AMThx for the hint Justin, didn't notice that I've created a Document. Here again:
Hi,
I have two questions regarding the paging mechanism of HornetQ.
Recently I added many messages to a Queue running in WildFly 8.1.0. Then I wanted to receive a message identified by its JMSMessageID, but I didn't get it.
So I made some more investigation:
- The javax.jms.QueueBrowser only gets the non paged messages
- A javax.jms.MessageConsumer with a filter on a paged JMSMessageID won't receive it
- A cli like 'jms-queue expire-message --queue-address=DLQ --filter=ID:129d6ae3-08d5-11e4-81e7-4f77d79c7f16' will fail with 'JBAS014749: Operation handler failed: No message found for JMSMessageID: ID:129d6ae3-08d5-11e4-81e7-4f77d79c7f16'
- When I consume all message in the Queue with the javax.jms.MessageConsumer, I'm able to find the wanted message
- When I use the cli 'jms-queue list-messages --queue-address=DLQ --filter="JMSMessageID='ID:129d6ae3-08d5-11e4-81e7-4f77d79c7f16'' or if I show all messages without a filter, the message is found. But I also saw that in this case the HorentQ Queue itself is used for iterating (hornetq/hornetq-server/src/main/java/org/hornetq/core/management/impl/QueueControlImpl.java at HornetQ_2_4_1_Final · hor… (method listMessages)).
In the HornetQ Documentation (hornetq/docs/user-manual/en/paging.xml at HornetQ_2_4_1_Final · hornetq/hornetq · GitHub) there are statements like this:
Browsers will read through the page-cursor system.
Consumers with selectors will also navigate through the page-files and it will ignore messages that don't match the criteria.
When I look in the org.hornetq.api.core.client.ClientSession the Javadoc looks like this (should be used by the QueueBrowser ;-) ):
-----------------------------------------------code---------------------------------------------
/**
* Creates a ClientConsumer to consume or browse messages matching the filter from the queue with
* the given name.
* <p>
* If <code>browseOnly</code> is <code>true</code>, the ClientConsumer will receive the messages
* from the queue but they will not be consumed (the messages will remain in the queue). Note
* that paged messages will not be in the queue, and will therefore not be visible if
* {@code browseOnly} is {@code true}.
* <p>
* If <code>browseOnly</code> is <code>false</code>, the ClientConsumer will behave like consume
* the messages from the queue and the messages will effectively be removed from the queue.
* @param queueName name of the queue to consume messages from
* @param filter only messages which match this filter will be consumed
* @param windowSize the consumer window size
* @param maxRate the maximum rate to consume messages
* @param browseOnly whether the ClientConsumer will only browse the queue or consume messages.
* @return a ClientConsumer
* @throws HornetQException if an exception occurs while creating the ClientConsumer
*/
---------------------------------------------end code-------------------------------------------
So my question:
Is it possible to receive the message with standard JMS 1.1 implementations?
If it is not possible do I have to configure things in a different way like the standard-full-ha.xml or do I have to use different browsers and consumers perhaps HornetQ native ones?
Thanks in advance for any helpful hint.
Cheers,
Markus