我正在尝试使用ruby amqp gems从队列中获取消息并收到错误。
我在标题中有一个字节数组(即实际记录),这是必须从开发前瞻性和类型不能更改。我试过qParser.pop做了|有效载荷|和consumer2.consume.on_delivery do | metadata,payload |但两个问题都有同样的错误。我找到了amqp协议 - > table引发了这个异常。
我只需要有效负载而不用担心标题
我很感激任何有关此事的工作。
ArgumentError: Not a valid type: "x"
Data: "\x00\x00\x064\fChannel-TypeS\x00\x00\x00\x03PHN\aApi-KeyS\x00\x00\x00\x03RTM\x0EContent-Lengthl\x00\x00\x00\x00\x00\x00\x01l\rActual-Recordx\x00\x00\x04{{\"custRoleTypeCd\":\"\",\"msgDlvryProcTs\":\"11/06/2015 05:16:22\",\"chnlTypeCd\":\"TMSG\",\"dlvryId\":\"400000000003713221\",\"mktgInd\":\"N\",\"vendrId\":\"11\",\"cntctPntAdrTxt\":\"3022000023\",\"sorId\":\"7\",\"elctrMsgFrmtDesc\":\"SMS\",\"msgCustId\":\"1000000165146\",\"msgLangCd\":\"\",\"quietPerdTznCd\":\"\",\"prodDesc\":\"MASTERCARD PLATINUM\",\"rplyToAdr\":\"\",\"cycleDt\":\"20151014\",\"last4DgtsTxt\":\"3599\",\"thldValTxt\":\"\",\"substitutionKeyValueData\":{\"AlertCode\":\"PAYPST\",\"CustomerFirstName\":\"Crysta\",\"VARBL_5_FCL_TXT\":\"298,35\",\"PaymentPostedDate\":\"OCT 14, 2015\",\"PaymentAmount\":\"298.35\",\"VARBL_9_ENG_TXT\":\"lloA7T%2FXblrp1Bc7aoIK0A%3D%3D\",\"productdescription\":\"MASTERCARD PLATINUM\",\"AccountEndingIn\":\"3599\",\"VARBL_10_FCL_TXT\":\"14 octobre 2015\",\"VARBL_10_ENG_TXT\":\"XqLuxBTABbIDvpw56ba34hF0imQ5McLi4fDdnotsiaY%3D\"},\"alrtTypeCd\":\"PAYPST\",\"quietPerdEndTm\":\"\",\"srcSysUnqId\":\"\",\"acctId\":\"10000371367\",\"evtRsltTypeDesc\":\"The system is preparing a message for delivery.\",\"tmplId\":\"10001\",\"loadTs\":\"11/06/2015 05:16:22\",\"fromAdr\":\"\",\"msgLobCd\":\"CARD\",\"wirlsPlanId\":\"\",\"quietPerdStrtTm\":\"\",\"elctrAdrTypeCd\":\"PHN\",\"subjLine\":\"\",\"oldDlvryId\":\"\",\"evtRsltReasId\":\"6020\",\"recProcId\":\"N\",\"sorCustId\":\"850784\"}\vcontentTypeS\x00\x00\x00\ntext/plain\nSet-CookieS\x00\x00\x00bJSESSIONID=91EED106D2925239197C35CF201727F4; Path=/int-dms-content-assembly-web/; Secure; HttpOnly\x06ServerS\x00\x00\x00\nCapitalOne\rCache-ControlS\x00\x00\x00.no-cache, no-store, max-age=0, must-revalidate\x06PragmaS\x00\x00\x00\bno-cache\x04Datel\x00\x00\x01Q\xA1\xF5\xB80\x13originalContentTypeS\x00\x00\x00\x10application/json\x0Fhttp_statusCodeS\x00\x00\x00\x03200\fContent-TypeS\x00\x00\x00\x10application/json"
Unprocessed data: "\x00\x00\x04{{\"custRoleTypeCd\":\"\",\"msgDlvryProcTs\":\"11/06/2015 05:16:22\",\"chnlTypeCd\":\"TMSG\",\"dlvryId\":\"400000000003713221\",\"mktgInd\":\"N\",\"vendrId\":\"11\",\"cntctPntAdrTxt\":\"3022000023\",\"sorId\":\"7\",\"elctrMsgFrmtDesc\":\"SMS\",\"msgCustId\":\"1000000165146\",\"msgLangCd\":\"\",\"quietPerdTznCd\":\"\",\"prodDesc\":\"MASTERCARD PLATINUM\",\"rplyToAdr\":\"\",\"cycleDt\":\"20151014\",\"last4DgtsTxt\":\"3599\",\"thldValTxt\":\"\",\"substitutionKeyValueData\":{\"AlertCode\":\"PAYPST\",\"CustomerFirstName\":\"Crysta\",\"VARBL_5_FCL_TXT\":\"298,35\",\"PaymentPostedDate\":\"OCT 14, 2015\",\"PaymentAmount\":\"298.35\",\"VARBL_9_ENG_TXT\":\"lloA7T%2FXblrp1Bc7aoIK0A%3D%3D\",\"productdescription\":\"MASTERCARD PLATINUM\",\"AccountEndingIn\":\"3599\",\"VARBL_10_FCL_TXT\":\"14 octobre 2015\",\"VARBL_10_ENG_TXT\":\"XqLuxBTABbIDvpw56ba34hF0imQ5McLi4fDdnotsiaY%3D\"},\"alrtTypeCd\":\"PAYPST\",\"quietPerdEndTm\":\"\",\"srcSysUnqId\":\"\",\"acctId\":\"10000371367\",\"evtRsltTypeDesc\":\"The system is preparing a message for delivery.\",\"tmplId\":\"10001\",\"loadTs\":\"11/06/2015 05:16:22\",\"fromAdr\":\"\",\"msgLobCd\":\"CARD\",\"wirlsPlanId\":\"\",\"quietPerdStrtTm\":\"\",\"elctrAdrTypeCd\":\"PHN\",\"subjLine\":\"\",\"oldDlvryId\":\"\",\"evtRsltReasId\":\"6020\",\"recProcId\":\"N\",\"sorCustId\":\"850784\"}\vcontentTypeS\x00\x00\x00\ntext/plain\nSet-CookieS\x00\x00\x00bJSESSIONID=91EED106D2925239197C35CF201727F4; Path=/int-dms-content-assembly-web/; Secure; HttpOnly\x06ServerS\x00\x00\x00\nCapitalOne\rCache-ControlS\x00\x00\x00.no-cache, no-store, max-age=0, must-revalidate\x06PragmaS\x00\x00\x00\bno-cache\x04Datel\x00\x00\x01Q\xA1\xF5\xB80\x13originalContentTypeS\x00\x00\x00\x10application/json\x0Fhttp_statusCodeS\x00\x00\x00\x03200\fContent-TypeS\x00\x00\x00\x10application/json"
Offset: 80
Total size: 1588
Processed data: {"Channel-Type"=>"PHN", "Api-Key"=>"RTM", "Content-Length"=>364}
答案 0 :(得分:0)
对于它的价值,我只是在java应用程序之间尝试了byte[]
标题,标题转移好了。但是,wireshark抱怨x
无效。
看the spec, section 4.2 - field values,看来" x" (对于byte [])可能是一个扩展名。
这里是code that writes it和reads it。
我在ruby amqp-protocol中看到了常量,但我没有看到它在decoder中使用。
你可能最好在rabbitmq-users
谷歌小组上询问兔子家伙。