ibm-messaging / mq-dev-samples

Samples for getting started with IBM MQ
Apache License 2.0
68 stars 108 forks source link

Adding basic MessageListener example #3

Closed maxkahan closed 5 years ago

maxkahan commented 5 years ago

Please have a check Mark!

ibmmqmet commented 5 years ago

In terms of the Java itself, there's one minor problem showing up in sendATextMessage(). The "producer" parameter to the function is either not needed or should be called something else as it gets reset in the function. I might also rewrite the userInterface() function so you don't call exit from the case statement but from outside (Eclipse shows a warning about there being no "break" statement in the case block which is understandable but I'd prefer to remove warnings where possible.)

But from a more general perspective, several things came to mind:

You shouldn't assume that someone has reached this code through the learn-mq site and examples. So things in the repository ought to be sufficient in themselves, or at least point at the web page documentation for it.

maxkahan commented 5 years ago

@ibmmqmet please have a look!

ibmmqmet commented 5 years ago

A few comments on the updated PR, but in general this is a lot closer.

maxkahan commented 5 years ago

@ibmmqmet how's now? Changes made