[rabbitmq-discuss] erlang 1.6.0 client possible problem
Mark Geib
mark.geib at echostar.com
Thu Apr 22 19:43:14 BST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Matthew,
Followup question. Will the 1.7.x erlang client work with 1.6.0 brokers.?
I have also tried to use the erlang client tagged with the broker
version number.
Mark.
On 04/22/2010 10:58 AM, Matthew Sackman wrote:
> Hi Mark,
>
> Needless to say, 1.6.0 is pretty ancient and we'd recommend that
> you upgrade to the latest 1.7.2, where lib_amqp has vanished, and
> the problem you're reporting has been abstracted away by the
> library.
>
> On Thu, Apr 22, 2010 at 10:36:07AM -0600, Mark Geib wrote:
>> case lib_amqp:get(Channel, Queue, false) of basic.get_emtpy ->
>> ...
>>
>> {DeliveryTag, Content} -> #content{payload_fragments_rev =
>> Payload, class_id = ClassId, properties_bin = Props} = Content,
>> Message = list_to_binary(Payload),
>
> The clue is in the name ;) payload_fragments_rev is a *reversed*
> list of fragments. Thus you'll need to reverse it first. The reason
> this only affects you with large messages is that smaller messages
> will be under the max frame size, and thus will only be a single
> fragment.
>
> Just ftr, if you do upgrade to 1.7.2, the API is now:
>
> {#'basic.get_ok'{}, #amqp_msg{payload = Payload}} =
> amqp_channel:call(Channel, #'basic.get'{queue = Q, no_ack =
> false}),
>
> There, Payload is a single binary, not reversed, and not a list,
> thus all the work has been done for you.
>
> Best wishes,
>
> Matthew
- --
Principal Engineer
Cheyenne Software Engineering
mark.geib at echostar.com / 35-215
PGP fingerprint:6DFC 389D 9796 0188 92E5 58F5 34C5 6B47 D091 76FD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvQmMIACgkQNMVrR9CRdv2jWQCfYxKz6uns4tXcojEXFoeovgxb
uNIAnRhFVhazu02sOqR22dfyxTsq8E+s
=4ncH
-----END PGP SIGNATURE-----
More information about the rabbitmq-discuss
mailing list