Hi,

I'm running Artemis 1.3.0 embedded inside a spring app running in Tomcat.

I have a remote message producer (NumberGuessMain.java) that uses the Apache 
Qpid Proton library to push messages onto an Artemis queue with the URL:

              amqp://localhost:5672/native-2-java

The messages created by the producer are JSON strings.

I have a single threaded, singleton consumer that uses the native Artemis API 
(NativeProcessMsgReader.java) running inside the same web app as Artemis, 
reading from the queue:

              native-2-java

While there are no messages to read, the consumer happily loops through the 
while loop in the "run" method.

As soon as the consumer tries to read the body of the first message, it hangs 
on the line:

              String receivedMsg = msgReceived.getBodyBuffer().readString();

The last lines in the log file are:

2016-09-01T22:27:26,270 15137 [Thread-6] DEBUG 
c.a.t.r.p.d.a.c.NativeProcessMsgReader - run - no message during last read 
period
2016-09-01T22:27:26,270 15137 [Thread-6] DEBUG 
c.a.t.r.p.d.a.c.NativeProcessMsgReader - run - in while loop, waiting for 
message
2016-09-01T22:27:26,772 15639 [Thread-6] DEBUG 
c.a.t.r.p.d.a.c.NativeProcessMsgReader - run - no message during last read 
period
2016-09-01T22:27:26,772 15639 [Thread-6] DEBUG 
c.a.t.r.p.d.a.c.NativeProcessMsgReader - run - in while loop, waiting for 
message
2016-09-01T22:27:26,912 15779 [Thread-6] DEBUG 
c.a.t.r.p.d.a.c.NativeProcessMsgReader - run - received non-null message
2016-09-01T22:27:26,912 15779 [Thread-6] DEBUG 
c.a.t.r.p.d.a.c.NativeProcessMsgReader - run - non-null message, body length: 
307

To me this looks like the message has reached Artemis and is made available to 
the consumer but something goes wrong when the consumer tries to access the 
body of the message.

I'm new to Artemis and AMQP so it's quite possible I'm doing something stupid...

Is the basic assumption that it's ok to send a message using AMQP and receive 
it using Artemis core API valid?

Is there something obvious in the code that is causing this problem?

Any pointers gratefully received.

Cheers, Andy

[cid:image012.png@01D17AF7.D972DF70]<http://www.oneadvanced.com/>
Andy Redhead
Principal Consultant > Solutions > Advanced
________________________

Advanced
230 City Road, London, EC1V 2TT
t: 020 7880 8888 > m: 0781 392 5246

www.oneadvanced.com<http://www.oneadvanced.com/>
[cid:image018.png@01D17AF7.D972DF70] <http://www.linkedin.com/company/2426258> 
[cid:image019.png@01D17AF7.D972DF70] <https://twitter.com/Going_Advanced>
> A Sunday Times Top Track 250 Company 2015
> Ranked in UK's 50 fastest growing technology companies 2014


***** Email confidentiality *****

This message is private and confidential. If you have received this message in 
error, please notify us and remove it from your system. The dissemination, 
copying or distribution of this message, or related files, by anyone other than 
the intended recipient is strictly prohibited.



Any views or opinions expressed are solely those of the author and do not 
necessarily represent those of Advanced 365 Limited.



***** Email monitoring *****

Advanced 365 Limited may monitor email traffic data and also the content of 
email for the purposes of security and staff training.



***** Email security *****

In keeping with good computing practice, the recipient of this email should 
ensure that it is virus-free. Advanced 365 Limited does not accept 
responsibility for any virus that may be transferred by way of this email.



Email may be susceptible to data corruption, interception and/or unauthorised 
amendment. Advanced 365 Limited does not accept liability for any such 
corruption, interception or amendment or any consequences thereof.



This email has been scanned for viruses by the Symantec Email Security.cloud 
service.



Advanced 365 Limited, part of the Advanced Computer Software Group

Registered office: Ditton Park, Riding Court Road, Datchet, Berkshire, SL3 9LL, 
UK

Registered in England under number 2124540

________________________________

Please consider the environment: Think before you print!

Reply via email to