Ruby AMQP Error : ArgumentError: Not a valid type: “x” with byte array element in Headers

I am trying to fetch messages from queue using ruby amqp gems and
getting error.

I have one byte array in header (i.e. actual record which comes as
actual recordx in amqp output) which is must from development
prospective and type cannot be changed. I have tried qParser.pop do |
payload> and consumer2.consume.on_delivery do |metadata, payload| but
same error in both issues. I found amqp protocol -> table raise this
exception.

I just need payload and not bother about headers

I would appreciate any work around on this.

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}