0

I have to send messages to IBM MQ by hitting a rest service. Below is the code I came up with, using Camel XML DSL.

<rest path="/basePath">
    <post uri="/path" consumes="application/xml" produces="application/xml">
        <to uri="ibmmq:QUEUE.NAME"/>
    </post>
</rest>

When I try to post the message, I get the following exception

org.apache.camel.RuntimeExchangeException: Failed to resolve replyTo destination on the exchange

Is the post method expecting response back from QUEUE, so that it can respond back to rest client? I only need the post service to reply with 200, if the message is successfully produced to QUEUE, 500 otherwise. How to solve this problem?

1
  • i'm also trying to implement IBM MQ Producer, if have the sample code in Github could you please link Commented Jul 5, 2020 at 12:55

1 Answer 1

1

Pattern of your exchange is InOut so this is default behavior for your jms producer. Try change it for specific endpoint like this:

<to uri="ibmmq:QUEUE.NAME" pattern="InOnly"/>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.