[rabbitmq-discuss] erlang 1.6.0 client possible problem

Mark Geib mark.geib at echostar.com
Thu Apr 22 19:20:33 BST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthew,

Thanks for the quick and helpful reply. That fixes my issue. We will
upgrade to the current release as soon as we can, but time is a little
short now.

Congratulations again on the Spring acquisition. Rabbitmq is by far
the highest quality product and support of all the OSS projects we
employ, and we use a fare number.

Thanks again,
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/

iEYEARECAAYFAkvQk3EACgkQNMVrR9CRdv0qIwCfdMNFQvJnoJIAiKdxz3rroIJI
fcoAn3/V2xMpGokNUGnS79hkWZ0XXg0F
=tcrn
-----END PGP SIGNATURE-----





More information about the rabbitmq-discuss mailing list