GithubHelp home page GithubHelp logo

Comments (5)

ibmmqmet avatar ibmmqmet commented on June 8, 2024

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.

ssuryava-tibco avatar ssuryava-tibco commented on June 8, 2024

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.

ibmmqmet avatar ibmmqmet commented on June 8, 2024

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.

ssuryava-tibco avatar ssuryava-tibco commented on June 8, 2024

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.

ibmmqmet avatar ibmmqmet commented on June 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.