Howto set MQMF_SEGMENTATION_ALLOWED?

Asked by Konstantin Aristov

Let me speek from my heard, and I'm very sorry about my poor English
Please, help me!
I'm try segmentation my message:
cont_="hello"
qmgr = pymqi.QueueManager(None)
cd = pymqi.CD()
cd.MaxMsgLength=len(cont_)+10
cd.ChannelName = mq_channel
cd.ConnectionName = conn_info
cd.ChannelType = CMQC.MQCHT_CLNTCONN
cd.TransportType = CMQC.MQXPT_TCP

qmgr.connectTCPClient(QMName, cd, mq_channel, conn_info)
md = pymqi.md()
md.MsgFlags = CMQC.MQMF_SEGMENTATION_ALLOWED
md.Persistence = CMQC.MQPER_PERSISTENT

od = pymqi.od()
od.ObjectName = mq_queue

queue = pymqi.Queue(qmgr)
queue.open(od, CMQC.MQOO_OUTPUT | CMQC.MQOO_SET_ALL_CONTEXT)
pmo = pymqi.pmo()
pmo.Options = CMQC.MQPMO_SET_ALL_CONTEXT

md_empty = pymqi.md()
queue.put(cont_, md_empty, pmo)
print md
bla-bla-bla

MsgFlags: 1 <--- it is CMQC.MQMF_SEGMENTATION_ALLOWED

when message arrived in destination QM - I see, what field of Segmentation is "Segmentation inhibited"
what I'm doing wrong?

Question information

Language:
English Edit question
Status:
Answered
For:
PyMQI Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Konstantin Aristov (kilo-alfa) said :
#1

Correction:
this is wrong code
md_empty = pymqi.md()
queue.put(cont_, md_empty, pmo)

I'm use this:

md = pymqi.md()
md.MsgFlags = CMQC.MQMF_SEGMENTATION_ALLOWED
md.Persistence = CMQC.MQPER_PERSISTENT
queue.put(cont_, md, pmo)

but no luck (((

Nevertheless, field "Persistent" on destination QM is exposed

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

I'm really sorry Konstantin but I've never used this particular flags - you'll need to check it on your own.

Also, please use GitHub in the future - https://github.com/dsuch/pymqi

Thanks and I'm sorry again!

Can you help with this problem?

Provide an answer of your own, or ask Konstantin Aristov for more information if necessary.

To post a message you must log in.