[erlang-questions] RabbitMQ Erlang client integration
Tue Nov 20 14:47:29 CET 2012
That is actually my problem - in a module I have to include both .hrl files
On 11/20/2012 1:13 PM, Patrik Nyblom wrote:
> 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.
> 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
>>>> 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.
>>>> erlang-questions mailing list
>> erlang-questions mailing list
> erlang-questions mailing list
More information about the erlang-questions