ibm-messaging / mq-golang

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

Not sharing Session when multi connecting to an SSL channel #194

Closed alex3dm closed 1 year ago

alex3dm commented 1 year ago
Снимок экрана 2022-11-24 в 12 43 31

Hello Not sharing Session when multi connecting to an SSL channel

ibmmqmet commented 1 year ago

I have absolutely no idea what you are asking here.

seminmw commented 1 year ago

I have this problem too. When we run the ibmmq.Connx(qMgrName, cno) function, a separate connection is created for each call. Each connection has 10 dialogs. I want 10 connections to connect through 1 physical dialog, not create 10 separate connections. Can you help with this problem? Example:

Снимок экрана 2022-11-23 в 17 08 09
alex3dm commented 1 year ago

@ibmmqmet up(seminmv) described in more detail

ibmmqmet commented 1 year ago

You've still not given ANY detail. A single screenshot is not a problem description.

What is the configuration? What is the application program doing? What are you expecting to see? Have you read the product documentation such as this that describes how to use SHRCONV?

alex3dm commented 1 year ago

Found a solution the problem was in parameter passing - SSLPeerName mqiMQCD.go func copyCDtoC(mqcd C.MQCD, gocd MQCD) { ... if gocd.SSLPeerName != "" { mqcd.SSLPeerNamePtr = C.MQPTR(unsafe.Pointer(C.CString(gocd.SSLPeerName))) with multiple connections, you need to cache the link to C.MQPTR(unsafe.Pointer(C.CString(gocd.SSLPeerName)))