ibm-messaging / mq-golang

Calling IBM MQ from Go applications
Apache License 2.0
168 stars 60 forks source link

Send messages to back-out queue automatically that can't be committed after n retries. #165

Closed WaqarHassan closed 3 years ago

WaqarHassan commented 3 years ago

Is there a way to setup BOTHRESH and BOQNAME attributes to move message automatically to back-out queue configured for a regular queue?

I have set up Backout requeue queue and Back-out threshold parameters on MQ server. But when back-out count is reached it does not move messages to the backout queue. Instead it keeps on retrying.

I have followed the dev patterns for JMS using following URL But it is not working for go-lang. https://github.com/ibm-messaging/mq-dev-patterns/tree/master/transactions/JMS/SE

Is it even possible for go-lang?

ibmmqmet commented 3 years ago

See the description of BOTHRESH/BOQNAME at https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.2.0/com.ibm.mq.ref.adm.doc/q085330_.html

Outside the JMS (and XMS) implementations, it is the application's responsibility to move messages to the backout queue.

ibmmqmet commented 3 years ago

See amqsbo.go in the samples tree for one example of how to deal with this

WaqarHassan commented 3 years ago

Thanks for the help. I have now set up back-out queue and have sent the messages to the back-out manually through the client-side code.