One version with both client and server bindings

Asked by Michał Niklas

Is it possible to have one version of the module that can work both in client and server mode?

I would like to use the same version of the module in both client-server environment and with local queues. I know I can use client version with local queues but it requires channel on this queue. I think the mode in which module connects with queue should be chosen during runtime by programmer or by administrator based on application configuration.

Regards,
Michał Niklas

Question information

Language:
English Edit question
Status:
Solved
For:
PyMQI Edit question
Assignee:
No assignee Edit question
Solved by:
Dariusz Suchojad
Solved:
Last query:
Last reply:
Revision history for this message
Best Dariusz Suchojad (dsuch) said :
#1

Hi,

frankly, I don't see it that way :-) The mode to connect with is rather a design-time choice. You either have sound reasons for connecting in bindings mode and tying your application very close with the queue manager or you leave yourself some space and always connect in the client mode, even if running on localhost; in that way the app itself can always be moved to another system if a need arise, it's not coupled to the queue manager.

On the implementation side of things, building PyMQI in a client mode means linking it with a client MQ library (mqic_r on Linux) while building PyMQI in the server mode links it to mqm_r MQ library. So the mode to connect with needs to be chosen on this very early stage.

So the short answer is that what you're asking about isn't currently supported but it could be some day, if PyMQI gets rewritten in Cython or ctypes and will support dynamic loading of MQ shared libraries.

Revision history for this message
Dariusz Suchojad (dsuch) said :
#2

Hey,

may I mark the question solved? I'll do so next week unless you'd like me to add more details.

Cheers!

Revision history for this message
Michał Niklas (mn-heuthes) said :
#3

Thanks Dariusz Suchojad, that solved my question.