[erlang-questions] RabbitMQ Erlang client integration

Bengt Kleberg <>
Tue Nov 20 15:50:08 CET 2012


Greetings,

Have you checked the performance penalty of a new record of your own,
with the same contents, that you pack before calling the module that has
to know the rabbitmq record?


bengt

On Tue, 2012-11-20 at 15:47 +0200, Martin Dimitrov wrote:
> 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:
> > 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
> > 
> > _______________________________________________
> > 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