> On Thu, Jul 19, 2012 at 12:37 AM, Roberto De Ioris <[email protected]>
> wrote:
>>
>>> hello,
>>>
>>> in working with the AMQP emperor i have a few note (the first two
>>> issues are critical for me):
>>>
>>> == issues ==
>>>
>>>  - [1.2.4, HEAD] anonymous queues created by emperor are not
>>> garbage-collected!
>>> this one is nasty! the emperor connects, does it's thing, and later
>>> dies ... but the queue sticks around collecting messages and dust.  i
>>> will porbably submit a patch for this unless you beat me Roberto (i
>>> think you just have to define the queue EXCLUSIVE or some such)
>>>
>>> - [1.2.4, HEAD] emperor fails if exchange is DURABLE, or not
>>> type-FANOUT
>>> any pre-configuration on the exchange that doesn't match what uWSGI
>>> would create causes failure (AMQP error waiting for
>>> Exchange.declare-ok)
>>>
>>> - [1.2.4, HEAD] missing port does not default to 5672
>>> ... instead it either does nothing at all (1.2.4), or fails connection
>>> repeatedly (HEAD)
>>>
>>> - [HEAD] `amqp://user:pass@host:port/` not parsed correctly
>>> username and password fail when in the connection string.  if `user`
>>> or `pass` are defined here the connection fails; if port is NOT
>>> defined connection fails (should use AMQP default of 5672)
>>>
>>> - [HEAD] unable to authenticate unless using guest/guest
>>> authentication fails no matter what i try ... tested by replacing
>>> guest with test/test ... works in 1.2.4
>>>
>>> == requests ==
>>>
>>> - configurable exchange name other than `uwsgi.emperor`
>>> amqp://user:pass@host:port/vhost?name=uwsgi.maximo
>>>
>>> - configurable exchange types (topic exchange with `#` binding is all
>>> but identical to fanout)
>>> amqp://user:pass@host:port/vhost?name=uwsgi.maximo&type=topic
>>>
>>> - configurable routing key subscriptions (eg, a topic exchange that
>>> only listens to `svr.grp.0.#`)
>>> amqp://user:pass@host:port/vhost?name=uwsgi.maximo&type=topic&key=svr.grp.0.#
>>>                                                                  prob
>>> need to escape # or use a different char ^^^^
>>>
>>> ====
>>>
>>> ... any of this sound unreasonable/off-the-wall?  i dont think any of
>>> it breaks backwards-compat. if some are more intrusive let me know and
>>> ill open tickets.
>>>
>>> --
>>>
>>> C Anthony
>>> _______________________________________________
>>> uWSGI mailing list
>>> [email protected]
>>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>>
>>
>>
>> I suggest you to work with 1.3, as its emperor has been greatly
>> improved.
>>
>> The AMQP part is now a plugin, and it should be a lot easier
>> understanding
>> it:
>
> i want to work from 1.3, but that second bug is killing me ... i can't
> authenticate at all :-(
>
> i'm sure it's a stupid problem but the pressure is on -- difficult to
> get the time needed to debug C, still sorta green there ... it takes
> me longer.
>
> any chance you can comment on the auth problem in particular?  why
> can't i auth in 1.3 HEAD (tried using amqp://user:pass@... and the
> older config options)?
>
> ... if i can solve that ASAP i can start using 1.3 tomorrow :-D ...
> the other issues/requests i can work around, or deal with, until fixed
> (by me or anyone else).
>
>> http://projects.unbit.it/uwsgi/browser/plugins/emperor_amqp/emperor_amqp.c
>
> [ ... explanations, thank you! ... ]
>
>> Feel free to make all of the mods you want (send pull request from
>> github
>> if you prefer)
>
> i will do that for sure, thanks Roberto.
>

Authentication is here:

uwsgi_imperial_monitor_amqp_init

the parser for ues->arg is missing (you will find username and password
hardcoded to 'guest').

If you can implement one, you only need to call

uwsgi_amqp_consume_queue(int fd, char *vhost, char *username, char
*password, char *queue, char *exchange, char *exchange_type)

with the right args (currently is all hardcoded as you can see)

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to