I'm writing an app against pulse, but today it is just sitting there,
never receiving any messages, where normally it gets them non-stop. The
connection seems to be OK (no errors starting up), but nothing after
that. Any ideas?
Dave
I would suggest clearing the queue before processing as there may be some invalidly formed messages in there due to testing my bugzilla extension.
I'll be sending some more info to the list about the new messages that will be available once that is put into production...essentially anytime anything is created or edited we'll get a message (users,groups,keywords,etc)
> _______________________________________________
> tools-pulse mailing list
> tools...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/tools-pulse
Dave
$ rabbitmqctl list_queues | greo david
david.h...@senecac.on.ca.testing 2093
I could read messages out of your queue using this script (I commented out the ack so the messages stay there for you):
#!/usr/bin/python
# Import our consumers from the lib
from mozillapulse import consumers
# Define a callback
def got_message(data, message):
print data
print message
print "==================\n%s\n" % txt
# Ack the message so it is removed from the broker's queue
#message.ack()
def main():
# Connect to Mozilla Pulse
pulse = consumers.BugzillaConsumer(applabel='david.h...@senecac.on.ca.testing')
# Tell the broker what we want to listen for ('#' is everything) and give our
# callback
pulse.configure(topic='#', callback=got_message)
# You can do this so that old/unprocessed messages in the queue are deleted
# before you start processing
#pulse.purge_existing_messages()
# Block and call the callback function when a message comes in
pulse.listen()
if __name__ == "__main__":
main()
Perhaps the script is listening to a dead socket and didn't throw an error?
Christian
Christian
On Aug 17, 2010, at 10:34 AM, Christian Legnitto wrote:
> Hmmm, I see messages sitting in your queue:
>
> $ rabbitmqctl list_queues | grep david
> david.h...@senecac.on.ca.testing 2093
>
> I could read messages out of your queue using this script (I commented out the ack so the messages stay there for you):
>
> #!/usr/bin/python
>
> # Import our consumers from the lib
> from mozillapulse import consumers
>
> # Define a callback
> def got_message(data, message):
> print data
> print message
> print "==================\n"
>
Dave
I'd have you connect via STOMP, but it looks like the port isn't forwarded out of the colo (darn).
What platform / python / carrot are you running? I'll try to reproduce, though it is all working for me :-/
Christian
Dave