mq-dev-patterns icon indicating copy to clipboard operation
mq-dev-patterns copied to clipboard

Dotnet examples unable to Balance on Uniform Cluster

Open RiaanJo opened this issue 2 years ago • 2 comments

Still investigating, but not sure if this is a limitation with the IBM.XMS NuGet package, or the dotnet examples themselves.

The dotnet samples don't seem to be able to be balanced when connected to a Uniform Cluster. Looking at the Queue Manager Application Status the BALANCED option is set to "NOTAPPLIC"

DIS APSTATUS(*) 8 : DIS APSTATUS(*) AMQ8932I: Display application status details. APPLNAME(bug\net6.0\ibmmq_samples.exe) CLUSTER(UNICLUSTER) COUNT(2) MOVCOUNT(0) BALANCED(NOTAPPLIC) TYPE(APPL)

Any advise would be kindly appreciated.

RiaanJo avatar Dec 22 '23 10:12 RiaanJo

When the samples were written, balancing on a uniform cluster wasn't taken into account. If you can fix the code, we will accept pull requests.

chughts avatar Dec 25 '23 15:12 chughts

Hi @chughts,

I've created a Fork and Branch where I've updated the dotnet Simple Get sample. That said, I'm not sure if this will still be inline with the base flow for the mq-dev-patterns.

See: https://github.com/RiaanJo/mq-dev-patterns/tree/Updating-for-Uniform-Cluster

To allow UNICLUSTER connections, using a DEVELOPER IBM MQ container (https://developer.ibm.com/tutorials/mq-connect-app-queue-manager-containers/), and test developer code in a UNICLUSTER as per https://github.com/ibm-messaging/mq-uniform-clusters, the simplest change is to just allow reconnects for the application.

I've not tried it on the other consumer samples. But in theory it should work too. I think the PUB/SUB model may need a bit more work though. and the REQUEST/RESPONCE may need a bit more work. Not sure the current UNICLUSTER example is really setup for it.

Please let me know what you think.

RiaanJo avatar Dec 26 '23 10:12 RiaanJo