[erlang-questions] RabbitMQ Erlang client integration

Patrik Nyblom <>
Tue Nov 20 12:13:34 CET 2012


Hi!

Record names are just names in headers, nothing stops you from having 
one record named e.g. user in one module and a completely different 
record with the same name in another. As long as you do not include both 
headers (or in some other way manage to declare the record "type" twice) 
in the same source code, you're OK. So just limit the use of the 
rabbitmq user record to a module that does not use your own user record.

/Patrik
On 11/20/2012 11:06 AM, Martin Dimitrov wrote:
> Thanks. I was hoping for a more elegant solution but this will do.
>
> On 11/20/2012 11:47 AM, Dmitry Demeshchuk wrote:
>> The possibly shortest way is to abuse the fact that records are actually
>> tuples and instead of using a #user record for rabbitmq just use a tuple
>> that corresponds to it. And comment out the rabbitmq's #user record
>> definition, of course.
>>
>>
>> On Tue, Nov 20, 2012 at 1:44 PM, Martin Dimitrov <>wrote:
>>
>>> Hi all,
>>>
>>> I want to connect to RabbitMQ broker through the Erlang client listed on
>>> their site. The problem is that it defines a record "user" and in our
>>> app we already have such named record.
>>>
>>> What can I do with minimal code changes?
>>>
>>> Thank you very much.
>>>
>>> Regards,
>>> Martin
>>> _______________________________________________
>>> erlang-questions mailing list
>>> 
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>
>>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list