I am evaluating JBoss 4.2.2 and JBoss Messaging 1.4.0SP3. When using
MessageConsumer with a messageSelector, the communication hangs.
The response ObjectMessage is build in the right way, msg.setJMSCorrelationID()
and msg.setJMSType() are set. The MessageProducer sends
the message, but the receiver doesn't receive it.
The messageSelector looks like this: (JMSCorrelationID = '1213880979122' AND
JMSType='java.lang.String')
It seems to be okay. (mistakes will produce an exception)
cfB = (ConnectionFactory) ic.lookup("/ConnectionFactory");
| connectionB = (Connection) cfB.createConnection();
| sessionB = connectionB.createSession(false,
Session.AUTO_ACKNOWLEDGE );
| queue = (Queue) ic.lookup("queue/B"); // one of the example
queues
| consumer = sessionB.createConsumer(queue, messagleSelector );
| Message msg = consumer.receive();
Note: the code works when running outside JBossAS, but does not receive
messages from inside the container.
After setting messageSelector=null a message is received. The debug-inspector
shows there are no message headers (JMSCorrelationID,JMSType) are set. I
verified the sender, while sending the jms header attributes are set (checked
with debugging inspector).
It seems the headers are lost during transport ....
Differences:
Outside JBossAS the inspector indicates a SpyObjectMessage while inside the
container a JbossObjectMessage is used.
Any ideas what's wrong? JBoss Messaging was installed with ant
(messaging-node1). A cluster configuration (based on all) is used with a single
node.
In the past the code was used with jboss 4.0.3 and JBossMQ. In run fine, but
after switching to jboss-messaging the hangs occur.
Questions:
1.) How can i solve the problem?
2.) Is there a difference in these lines or are they equivalent?
msg.setJMSCorrelationID(correlationId); // 1
msg.setStringProperty("JMSCorrelationID", correlationId ); //2
markus
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159310#4159310
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159310
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user