Comments (5)
Not enough information here.
What buffer are you passing into the Get (or GetSlice) function? What is telling you that the message length is 0? Remember that there will be a returned error object, because the MQRC is considered a warning. So you need to take that into account when checking the returned values.
from mq-golang.
Hi @ibmmqmet,
We are taking buffer size as input from user, and default buffer as buffer = make([]byte, int32(50000))
in Get function.
The Get call is giving warning as below
Get activity got this warning on the get api call [MQGET: MQCC = MQCC_WARNING [1] MQRC = MQRC_TRUNCATED_MSG_ACCEPTED [2079]]
The function is bufLen, err := queue.Get(getmqmd, gmo, buffer)
where it is returning 0 as bufLen
I can see MQMD properties for the output message, but message is empty with no data
Below is the debug log from Get app
GMO option is &{1 69 1000 0 0 3 32 32 32 32 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] -1 0 {0 <nil>}} and gmo op is 69
2023-11-06T07:28:23.140Z WARN [ibmmq-get] - Get activity got this warning on the get api call [MQGET: MQCC = MQCC_WARNING [1] MQRC = MQRC_TRUNCATED_MSG_ACCEPTED [2079]]
2023-11-06T07:28:23.140Z DEBUG [ibmmq-get] - Get activity got [0] bytes from queue [Q2]
this is bufLen 0
this is msgbuff []
2023-11-06T07:28:23.140Z DEBUG [ibmmq-get] - Get created MQMD output map: [map[AccountingToken:HgEFFQAAAKWeuyoa/kBAAbs4TvQBAAAAAAAAwE/ILws= ApplIdentityData: ApplOriginData: BackoutCount:0 CodedCharSetId:819 CorrelId:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Encoding:546 Format: MsgId:QU1RIFFNMjEgICAgICAgIGC09WQCMSFA MsgType:Datagram Priority:0 PutApplName:APP - IBM MQ PutApplType:6 PutDate:20231106 PutTime:07225184 ReplyToQ: ReplyToQmgr:QM21 UserIdentifier:Administrato]]
2023-11-06T07:28:23.141Z DEBUG [ibmmq-get] - %!a(string=Get) got basic string message with content []
2023-11-06T07:28:23.141Z DEBUG [ibmmq-get] - Get pushed existing queue manager for connection name [MQConn]
2023-11-06T07:28:23.141Z DEBUG [ibm-mq.activity.get] - Task[Get] - Set Output: MQMD = map[AccountingToken:HgEFFQAAAKWeuyoa/kBAAbs4TvQBAAAAAAAAwE/ILws= ApplIdentityData: ApplOriginData: BackoutCount:0 CodedCharSetId:819 CorrelId:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Encoding:546 Format: MsgId:QU1RIFFNMjEgICAgICAgIGC09WQCMSFA MsgType:Datagram Priority:0 PutApplName:APP- IBM MQ PutApplType:6 PutDate:20231106 PutTime:07225184 ReplyToQ: ReplyToQmgr:QM21 UserIdentifier:Administrato]
2023-11-06T07:28:23.141Z DEBUG [ibm-mq.activity.get] - Task[Get] - Set Output: Message = map[String:]
2023-11-06T07:28:23.141Z DEBUG [ibm-mq.activity.get] - Task[Get] - Set Output: MessageProperties = map[]
2023-11-06T07:28:23.141Z DEBUG [ibmmq-get] - Get IBM MQ get eval end
Please suggest.
Thanks,
Sneha Suryawanshi
from mq-golang.
you've said you have a large DEFAULT buffer, but not actually shown what the real input buffer is. The only way I can get a zero length returned buffer is to supply an empty buffer on input.
from mq-golang.
Hi @ibmmqmet ,
If I am giving buffer as buffer = make([]byte, 50000)
and message to be get is more in size, say 51000 bytes.
In this scenario, if MQGMO_ACCEPT_TRUNCATED_MSG
GMO option is used, then ideally the data should get truncate and buffer should get filled with 50000 bytes right?
In my case I am getting GET call output as 0 bytes. Data truncation should work with the GMO option MQGMO_ACCEPT_TRUNCATED_MSG
Somehow it is not happening.
from mq-golang.
Can't think why it's not behaving as expected for you. It's doing the correct things for me. Perhaps try modifying the mqi.go
source file to print the buffer just before the call to MQGET in the getInternal
function.
from mq-golang.
Related Issues (20)
- How to set Delivery Delay like JMS 2.0 HOT 1
- MQ 7.x HOT 4
- 'keyRepoPasswordPtr' undeclared HOT 2
- Getting the Application Data in Messages
- Listing MQ Queues and which Clusters they belong to ? HOT 4
- CCDTurl in http and ftp format throwing MQRC_NOT_AUTHORIZED [2035] HOT 5
- Don`t connect to server. "MQCONNX: MQCC = MQCC_FAILED [2] MQRC = MQRC_CONNECTION_BROKEN [2009] HOT 7
- Not sharing Session when multi connecting to an SSL channel HOT 5
- Grafana and Prometheus IBM MQ metric for total messages count. HOT 1
- What types of key repositories work with this library? HOT 1
- Is same kdb store used for client certs and server certs? HOT 1
- How to utilize mqclient.ini HOT 1
- feat: Queue stops and queue-to-pageset mapping HOT 2
- MQ Client SDK for ARM64 HOT 1
- Manual message acknowledge HOT 1
- User HOT 4
- Concurrency issue with Inq: concurrent map writes HOT 1
- errorCode=2539, reason=MQRC_CHANNEL_CONFIG_ERROR #172
- LIBC Incompatible HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mq-golang.