rest call passing request body to amqp

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

rest call passing request body to amqp

Onder SEZGIN
hi,

i was trying out simple case.
first route sends message to queue whereas second one fails with an error
as below.

it feels weird. anybody tried anything similar to pass the rest call
message body to amqp queue.

thanks.

// from("timer:order?period=3000").setBody(constant("Hello

// world")).to("amqp:queue:incomingOrders");


rest("/goods").post("/status").type(String.class).to("direct:sendBody");


from("direct:sendBody").log("Body going to queue: ${body}"
).convertBodyTo(String.class)

.to("amqp:queue:incomingOrders");



2019-10-26 00:55:52.457  WARN 1 --- [masse.svc:5671]]
o.a.q.j.p.a.b.AmqpResourceBuilder        : Open of
resource:(ID:e1d142bb-2c15-45e2-a540-35edaee41724:1:1) failed: AMQ119016:
not authorized to create temporary destination, AMQ229213: User: admin does
not have permission='CREATE_NON_DURABLE_QUEUE' for queue
5bc0fdfe-f78b-11e9-9a00-0a58ac17025e on address
5bc0fdfe-f78b-11e9-9a00-0a58ac17025e [condition = amqp:unauthorized-access]
2019-10-26 00:55:57.469  WARN 1 --- [incomingOrders]]
o.a.c.c.j.r.TemporaryQueueReplyManager   : Exception inside the DMLC for
Temporary ReplyTo Queue for destination incomingOrders, refreshing ReplyTo
destination

javax.jms.JMSSecurityException: AMQ119016: not authorized to create
temporary destination, AMQ229213: User: admin does not have
permission='CREATE_NON_DURABLE_QUEUE' for queue
5bc0fdfe-f78b-11e9-9a00-0a58ac17025e on address
5bc0fdfe-f78b-11e9-9a00-0a58ac17025e [condition = amqp:unauthorized-access]
at
org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:143)
~[qpid-jms-client-0.30.0.jar!/:na]
at
org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:117)
~[qpid-jms-client-0.30.0.jar!/:na]
at
org.apache.qpid.jms.provider.amqp.builders.AmqpResourceBuilder.handleClosed(AmqpResourceBuilder.java:185)
~[qpid-jms-client-0.30.0.jar!/:na]
at
org.apache.qpid.jms.provider.amqp.builders.AmqpResourceBuilder.processRemoteClose(AmqpResourceBuilder.java:129)
~[qpid-jms-client-0.30.0.jar!/:na]
at
org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:972)
~[qpid-jms-client-0.30.0.jar!/:na]
at
org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1800(AmqpProvider.java:104)
~[qpid-jms-client-0.30.0.jar!/:na]
at
org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:802)
~[qpid-jms-client-0.30.0.jar!/:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
~[na:1.8.0_181]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_181]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
~[na:1.8.0_181]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
~[na:1.8.0_181]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[na:1.8.0_181]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[na:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]