Search Results

Search found 47 results on 2 pages for 'amqp'.

Page 1/2 | 1 2  | Next Page >

  • php amqp error while running make

    - by Dmitriy Apollonin
    I'm trying to install php amqp according to this answer http://stackoverflow.com/a/9997263/2271028 but at the make command i see following: /bin/bash /var/www/rabbitmq-c/amqp-1.4.0/libtool --mode=compile cc -I. -I/var/www/rabbitmq-c/amqp-1.4.0 -DPHP_ATOM_INC -I/var/www/rabbitmq-c/amqp-1.4.0/include -I/var/www/rabbitmq-c/amqp-1.4.0/main -I/var/www/rabbitmq-c/amqp-1.4.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/www/rabbitmq-c/amqp-1.4.0/amqp.c -o amqp.lo libtool: compile: cc -I. -I/var/www/rabbitmq-c/amqp-1.4.0 -DPHP_ATOM_INC -I/var/www/rabbitmq-c/amqp-1.4.0/include -I/var/www/rabbitmq-c/amqp-1.4.0/main -I/var/www/rabbitmq-c/amqp-1.4.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/www/rabbitmq-c/amqp-1.4.0/amqp.c -fPIC -DPIC -o .libs/amqp.o In file included from /var/www/rabbitmq-c/amqp-1.4.0/amqp.c:46:0: /var/www/rabbitmq-c/amqp-1.4.0/php_amqp.h:303:2: error: unknown type name 'amqp_socket_t' /var/www/rabbitmq-c/amqp-1.4.0/amqp.c: In function 'amqp_error': /var/www/rabbitmq-c/amqp-1.4.0/amqp.c:616:4: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat] make: *** [amqp.lo] Error 1 I see that there is some trouble with make, but can not resolve this problem. Any ideas? Thanks.

    Read the article

  • Flushing a queue using AMQP, Rabbit, and Ruby

    - by jeffshantz
    I'm developing a system in Ruby that is going to make use of RabbitMQ to send messages to a queue as it does some work. I am using: Ruby 1.9.1 Stable RabbitMQ 1.7.2 AMQP gem v0.6.7 (http://github.com/tmm1/amqp) Most of the examples I have seen on this gem have their publish calls in an EM.add_periodic_timer block. This doesn't work for what I suspect is a vast majority of use cases, and certainly not for mine. I need to publish a message as I complete some work, so putting a publish statement in an add_periodic_timer block doesn't suffice. So, I'm trying to figure out how to publish a few messages to a queue, and then "flush" it, so that any messages I've published are then delivered to my subscribers. To give you an idea of what I mean, consider the following publisher code: #!/usr/bin/ruby require 'rubygems' require 'mq' MESSAGES = ["hello","goodbye","test"] AMQP.start do queue = MQ.queue('testq') messages_published = 0 while (messages_published < 50) if (rand() < 0.4) message = MESSAGES[rand(MESSAGES.size)] puts "#{Time.now.to_s}: Publishing: #{message}" queue.publish(message) messages_published += 1 end sleep(0.1) end AMQP.stop do EM.stop end end So, this code simply loops, publishing a message with 40% probability on each iteration of the loop, and then sleeps for 0.1 seconds. It does this until 50 messages have been published, and then stops AMQP. Of course, this is just a proof of concept. Now, my subscriber code: #!/usr/bin/ruby require 'rubygems' require 'mq' AMQP.start do queue = MQ.queue('testq') queue.subscribe do |header, msg| puts "#{Time.now.to_s}: Received #{msg}" end end So, we just subscribe to the queue, and for each message received, we print it out. Great, except that the subscriber only receives all 50 messages when the publisher calls AMQP.stop. Here's the output from my publisher. It has been truncated in the middle for brevity: $ ruby publisher.rb 2010-04-14 21:45:42 -0400: Publishing: test 2010-04-14 21:45:42 -0400: Publishing: hello 2010-04-14 21:45:42 -0400: Publishing: test 2010-04-14 21:45:43 -0400: Publishing: test 2010-04-14 21:45:44 -0400: Publishing: test 2010-04-14 21:45:44 -0400: Publishing: goodbye 2010-04-14 21:45:45 -0400: Publishing: goodbye 2010-04-14 21:45:45 -0400: Publishing: test 2010-04-14 21:45:45 -0400: Publishing: test . . . 2010-04-14 21:45:55 -0400: Publishing: test 2010-04-14 21:45:55 -0400: Publishing: test 2010-04-14 21:45:55 -0400: Publishing: test 2010-04-14 21:45:55 -0400: Publishing: goodbye Next, the output from my subscriber: $ ruby consumer.rb 2010-04-14 21:45:56 -0400: Received test 2010-04-14 21:45:56 -0400: Received hello 2010-04-14 21:45:56 -0400: Received test 2010-04-14 21:45:56 -0400: Received test 2010-04-14 21:45:56 -0400: Received test 2010-04-14 21:45:56 -0400: Received goodbye 2010-04-14 21:45:56 -0400: Received goodbye 2010-04-14 21:45:56 -0400: Received test 2010-04-14 21:45:56 -0400: Received test . . . 2010-04-14 21:45:56 -0400: Received test 2010-04-14 21:45:56 -0400: Received test 2010-04-14 21:45:56 -0400: Received test 2010-04-14 21:45:56 -0400: Received goodbye If you note the timestamps in the output, the subscriber only receives all of the messages once the publisher has stopped AMQP and exited. So, being an AMQP newb, how can I get my messages to deliver immediately? I tried putting AMQP.start and AMQP.stop in the body of the while loop of the publisher, but then only the first message gets delivered -- though strangely, if I turn on logging, there are no error messages reported by the server and the messages do get sent to the queue, but never get received by the subscriber. Suggestions would be much appreciated. Thanks for reading.

    Read the article

  • AMQP gem specifying a dead letter exchange

    - by JP.
    I've specified a queue on the RabbitMQ server called MyQueue. It is durable and has x-dead-letter-exchange set to MyQueue.DLX. (I also have an exchange called MyExchange bound to that queue, and another exchange called MyQueue.DLX, but I don't believe this is important to the question) If I use ruby's amqp gem to subscribe to those messages I would do it like this: # Doing this before and in a new thread has to do with how my code is structured # shown here in case it has a bearing on the question Thread.new do AMQP.start('amqp://guest:[email protected]:5672') end EventMachine.next_tick do channel = AMQP::Channel.new(AMQP.connection) queue = channel.queue("MyQueue", :durable => true, :'x-dead-letter-exchange' => "MyQueue.DLX") queue.subscribe(:ack => true) do |metadata, payload| p metadata p payload end end If I execute this code with the queues and exchanges already created and bound (as they need to be in my set up) then RabbitMQ throws the following error in its logs: =ERROR REPORT==== 19-Aug-2013::14:25:53 === connection <0.19654.2>, channel 2 - soft error: {amqp_error,precondition_failed, "inequivalent arg 'x-dead-letter-exchange'for queue 'MyQueue' in vhost '/': received none but current is the value 'MyQueue.DLX' of type 'longstr'", 'queue.declare'} Which seems to be saying that I haven't specified the same Dead Letter Exchange as the pre-existing queue - but I believe I have with the queue = ... line. Any ideas?

    Read the article

  • AMQP 'connection.open' reserved parameters

    - by jldupont
    I am writing an AMQP Client Library in Erlang. For the 'connection.open' method, there are 2 reserved parameters "documented" in AMQP 0.9.1 out of a total of 3. When I send the method in question without the "reserved parameters", I get "unable to decode method" in the error log. What should I be sending as value for those "reserved parameters" ?? Update: It seems the server still expects some parameters even if the parameters are deprecated (see source code for code generator).

    Read the article

  • Using AMQP to collect events

    - by synapse
    Does AMQP has any advantages over an ad-hoc implementation for a simple stats gathering scenario? It works like this - clients send events (more than we care to put into persistent storage) to (several) web workers, the workers aggrregate them and write to a single database. I don't think I should consider using AMQP for this because I'll still need web workers to receive events from clients through HTTP and to publish them. Am I missing something?

    Read the article

  • Throttling an AMQP Consumer Using RabbitMQ

    - by Nicholas
    I'm using AMQP in a reliability pattern and my use-case is to put messages in a queue, then consume them and insert the information into a web service. My web service is slow, and my queue can have many, many messages and I would like to ensure that the consumer doesn't kill my database. Is there a build-in way to perform throttling in RabbitMQ, either time-based(only X messages per minute/second/hour) or some other mechanism?

    Read the article

  • erlang AMQP client library

    - by jldupont
    Is there an Erlang AMQP client library that isn't tied to the hip with RabbitMQ ? I know about http://hg.rabbitmq.com/rabbitmq-erlang-client/ but I would like something more decoupled... pain when it comes to packaging this stuff for a Debian repository, installation etc...

    Read the article

  • how to upload a file from php to amqp

    - by user2462648
    i want to know... how can i send a file to a rabbitmq queue from php. i have gone through many examples most of them didnt work. below is a consumer producer example which is near to working. Below is a the publisher.php <?php require_once('../php-amqplib/amqp.inc'); include('../config.php'); $conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST); $channel = $conn->channel(); $channel->exchange_declare('upload-pictures','direct', false, true, false); $metadata = json_encode(array( 'image_id' => $argv[1], 'user_id' => $argv[2], 'image_path' => $argv[3] )); $msg = new AMQPMessage($metadata, array('content_type' => 'text/plain','delivery_mode' => 2)); $channel->basic_publish($msg, 'upload-pictures'); $channel->close(); $conn->close(); ?> consumer.php <?php require_once('../php-amqplib/amqp.inc'); include('../config.php'); $conn = new AMQPConnection(HOST, PORT, USER, PASS,VHOST); $channel = $conn->channel(); $queue = 'add-points'; $consumer_tag = 'consumer'; $channel->exchange_declare('upload-pictures','direct', false, true, false); $channel->queue_declare('add-points',false, true, false, false); $channel->queue_bind('add-points', 'upload-pictures'); $consumer = function($msg){}; $channel->basic_consume($queue,$consumer_tag,false,false,false,false,$consumer); ?> according to the example provided in the rabbitmq manual, i need to run consumer(php consumer.php) first in one terminal and the publisher (php publisher.php 1 2 file/path.png) in another terminal, i will get a "Adding points to user: 2" message in the consumer terminal. iam not getting this message at all. can you suggest where iam going wrong

    Read the article

  • AMQP subscriber inside Rails app

    - by Fotios
    Is it possible to start an AMQP subscriber with my Rails app? Possibly through an initializer or something. I'd like to have it running at the same time that can also interact with Rails models. Below is a pseudo-code example of what I mean. queue.subscribe do |msg,body| Foo.create(....) end

    Read the article

  • Posting messages in two RabbitMQ queue, instead of one (using py-amqp)

    - by Khelben
    I've got this strange problem using py-amqp and the Flopsy module. I have written a publisher that sends messages to a RabbitMQ server, and I wanted to be able to send it to a specified queue. On the Flopsy module that is not possible, so I tweaked it adding a parameter and a line to declare the queue on the init_ method of the Publisher object def __init__(self, routing_key=DEFAULT_ROUTING_KEY, exchange=DEFAULT_EXCHANGE, connection=None, delivery_mode=DEFAULT_DELIVERY_MODE, queue=DEFAULT_QUEUE): self.connection = connection or Connection() self.channel = self.connection.connection.channel() self.channel.queue_declare(queue) # ADDED TO SET UP QUEUE self.exchange = exchange self.routing_key = routing_key self.delivery_mode = delivery_mode The channel object is part of the py-amqplib library The problem I've got it's that, even if it's sending the messages to the specified queue, it's ALSO sending the messages to the default queue. AS in this system we expect to send quite a lot of messages, we don't want to stress the system making useless duplicates... I've tried to debug the code and go inside the py-amqplib library, but I'm not able figure out any error or lacking step. Also, I'm not able to find any documentation form py-amqplib outside the code. Any ideas on why is this happening and how to correct it?

    Read the article

  • Example of standalone Apache Qpid (amqp) Junit Test

    - by Wiretap
    Does anyone have an example of using Apache Qpid within a standalone junit test. Ideally I want to be able to create a queue on the fly which I can put/get msgs within my test. So I'm not testing QPid within my test, I'll use integration tests for that, however be very useful to test methods handling msgs with having to mock out a load of services.

    Read the article

  • SpringSource rachète Rabbit Technologies, société à l'origine de la solution AMQP Rabbit MQ

    Et une acquisition de plus pour SpringSource ! Non content d'avoir déjà une bonne assise dans le domaine de messaging en employant plusieurs commiter sur ActiveMQ, SpringSource rachète aquiert Rabbit Technologies. Rabbit Technologies est la société derrière RabbitMQ, qui est une implémentation d'un serveur AMQP. Ce protocol, contraitement à JMS qui n'a pour objectif de fournir une API d'accès, à pour but de standardiser tout le système de messaging allant des différents mode de transmission au format de messages. Grâce à cela, tout serveurs compatibles AMQP peuvent commiquer entre eux, indépendamment du langage dans lequel ils sont implémenté ou le système sur lequel il tourne.

    Read the article

  • Which one should I choose AMQP or XMPP for real-time browser-based game?

    - by Devyn
    Hi, I'm choosing between AMQP (RabbitMQ) vs XMPP (eJabberd) for my browser-based flash-free javascript powered real-time turn-based game. I don't know much about AMQP and XMPP protocol. I would like to use PHP for user-authorization and some data store-retrieve with MySQL. As far as I found out, RabbitMQ has PHP clients but eJabberd not. What I understood is javascript client calls PHP script and manipulate necessary processing and then pass to AMQP or XMPP server to pass the data to opponent player. There is a good book 'Pro XMPP Programming with JS and jQuery' from Wrox but there is no example with PHP. So following are my questions. 1) Which protocol is suit for my game? 2) Shall I choose RabbitMQ just for it's PHP client support?

    Read the article

  • Is AMQP suitable as both an intra and inter-machine software bus?

    - by Bwooce
    I'm trying to get my head around AMQP. It looks great for inter-machine (cluster, LAN, WAN) communication between applications but I'm not sure if it is suitable (in architectural, and current implementation terms) for use as a software bus within one machine. Would it be worth pulling out a current high performance message passing framework to replace it with AMQP, or is this falling into the same trap as RPC by blurring the distinction between local and non-local communication? I'm also wary of the performance impacts of using a WAN technology for intra-machine communications, although this may be more of an implementation concern than architecture. War stories would be appreciated.

    Read the article

  • In which domains are message oriented middleware like AMQP useful?

    - by cocotwo
    What problem do MOM (Message Oriented Middleware) solve? Scalability? Integration? In which domain are they typically used and in which domains are they typically not used? For example, say, is Google using such solution for it's main search engine or to power GMail? What about big websites like Walmart, eBay, FedEx (pretty much a Java shop) and buy.com (pretty much an MS shop)? Does MOM solve a need there? Does it make any sense when you're writing a Webapp where you control the server-side and have an homogenous environment (say tens of Amazon EC2 instances all running Linux + Java JVMs) there and where the clients are, well, Web browsers? Does it make sense for desktop apps that need to communicate with a server? Or is it 'only' for big enterprise stuff where you typically have a happy mix of countless of different systems that needs to communicate in a way or another? I'm a bit confused as to what they're useful for and I think that with example of where they're appropriate and where they're not appropriate I could better understand their use.

    Read the article

  • Apache Camel ESB for C# and Java EDA

    - by Dokie
    Hi We are looking at integrating some of our coarse grained business Services using an Event Driven Architecture (EDA) and the server side of these Services (REST) are implemented in both Java and .NET (C#). We originally thought of using RabbitMQ (and AMQP protocol) as a neutral and open means (with good client support in these two languages), but it means having to support another runtime (Erlang) alongside Java and the CLR. We are also looking at Apache qPid as that has a Java broker implementation of the AMQP protocol which might eliminate that concern. Does anyone have any experience of trying to use the richer Apache Camel ESB on top of ActiveMQ to integrate Java and .NET Services in a Pub-Sub EDA manner? Have I missed any other possible suggestions as to a route through this? Thanks

    Read the article

  • What messaging technologies in windows-ce for gauranteed msg delivery?

    - by Aidanapword
    All, We are building a windows-ce (6.0R3) based device that requires guaranteed and audit-ready message delivery (including store & forward) up to and down from the cloud. I have been looking for choices beyond: MSMQ a proprietary solution (what our prototype device is using) AMQP (research on using this in our context is now starting) ... are there any others? We will be transporting sensitive data (who isn't?!?!) over a public network, and large scale options are required. Anything running on an embedded device will be performance sensitive too. Thanks! Aidanapword

    Read the article

  • What messaging technologies in windows-ce for guaranteed msg delivery?

    - by Aidanapword
    We are building a windows-ce (6.0R3) based device that requires guaranteed and audit-ready message delivery (including store & forward) up to and down from the cloud. I have been looking for choices beyond: MSMQ a proprietary solution (what our prototype device is using) AMQP (I have not found any RabbitMQ clients for CE, by example) ... are there any others? We will be transporting sensitive data (who isn't?!?!) over a public network, and large scale options are required. Anything running on an embedded device will be performance sensitive too.

    Read the article

  • Using RabbitMQ (Java client), is there a way to determine if network connection is closed during con

    - by MItch Branting
    I'm using RabbitMQ on RHEL 5.3 using the Java client. I have 2 nodes (machines). Node1 is consuming messages from a queue on Node2 using the Java helper class QueueingConsumer. QueueingConsumer consumer = new QueueingConsumer(channel); channel.basicConsume("MyQueueOnNode2", noAck, consumer); while (true) { QueueingConsumer.Delivery delivery = consumer.nextDelivery(); ... Process message - delivery.getBody() } If the interface is brought down on Node1 or Node2 (e.g. ifconfig eth1 down), the client (above) never knows the network isn't there anymore. Does RabbitMQ provide some type of configuration on the Java client that can be used to determine if the connection has gone away. Shutting down the RabbitMQ server on Node2 will trigger a ShutdownSignalException, which can be caught and the app can go into a reconnect loop. But bringing down the interface doesn't cause any type of exception to happen, so the code will be waiting forever on consumer.nextDelivery(). I've also tried using the timeout version of this call. e.g. QueueingConsumer consumer = new QueueingConsumer(channel); channel.basicConsume("MyQueueOnNode2", noAck, consumer); int timeout_ms = 30000; while (true) { QueueingConsumer.Delivery delivery = consumer.nextDelivery(timeout_ms); if (delivery == null) { if (channel.isOpen() == false) // Seems to always return true { throw new ShutdownSignalException(); } } else { ... Process message - delivery.getBody() } } but appears that this always returns true (even though the interface is down). I assume registering for the ShutdownListener on the connection will yield the same results, but haven't tried that yet. Is there a way to configure some sort of heartbeat, or do you just have to write custom lease logic (e.g. "I'm here now") in order to get this to work?

    Read the article

  • Wait for a single RabbitMQ message with a timeout

    - by Evgeny
    I'd like to send a message to a RabbitMQ server and then wait for a reply message (on a "reply-to" queue). Of course, I don't want to wait forever in case the application processing these messages is down - there needs to be a timeout. It sounds like a very basic task, yet I can't find a way to do this. I've now run into this problem with both py-amqplib and the RabbitMQ .NET client. The best solution I've got so far is to poll using basic_get with sleep in-between, but this is pretty ugly: def _wait_for_message_with_timeout(channel, queue_name, timeout): slept = 0 sleep_interval = 0.1 while slept < timeout: reply = channel.basic_get(queue_name) if reply is not None: return reply time.sleep(sleep_interval) slept += sleep_interval raise Exception('Timeout (%g seconds) expired while waiting for an MQ response.' % timeout) Surely there is some better way?

    Read the article

  • Java JMS Messaging

    - by London
    Hello, I have a working example of sending message to server and server receiving it via qpid messaging. Here is simple hello world to send to server : http://pastebin.com/M7mSECJn And here is server which receives requests and sends response(the current client doesn't receive response) : http://pastebin.com/2mEeuzrV Here is my property file : http://pastebin.com/TLEFdpXG They all work perfectly, I can see the messages in the qpid queue via Qpid JMX management console. These examples are downloaded from https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example (someone may need it also). I've done Jboss messaging using spring before, but I can't manage to do the same with qpid. With jboss inside applicationsContext I had beans jndiTemplate, conectionFactory, destinationQueue, and jmscontainer like this : <!-- Queue configuration --> <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop> <prop key="java.naming.provider.url">jnp://localhost:1099</prop> <prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop> <prop key="java.naming.security.principal">admin</prop> <prop key="java.naming.security.credentials">admin</prop> </props> </property> </bean> <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate" ref="jndiTemplate" /> <property name="jndiName" value="ConnectionFactory" /> </bean> <bean id="queueDestination" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate" ref="jndiTemplate" /> <property name="jndiName"> <value>queue/testQueue</value> </property> </bean> <bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="connectionFactory" /> <property name="destination" ref="queueDestination" /> <property name="messageListener" ref="listener" /> </bean> and of course sender and listener : Now I'd like to rewrite this qpid example using spring context logic. Can anyone help me?

    Read the article

  • Check for messages apache Qpid

    - by c0mrade
    Is it possible to check for messages from Qpid queue from unix/windows console? Here is how I check via GUI : http://i47.tinypic.com/pbu5d.gif I can see all the info from Qpid JMX Management Console, is there a something close to this that I can use in console?

    Read the article

  • ActiveMQ & Camel - How to create dependency in routing paths

    - by CodeMedic
    I have a message routing to implement, which has routes that vary according to the message content. Some strands of the route are dependent on other. If for example I have Data_A which has Task_A and Task_B to be performed on it. Whereas Data_B has only Task_B to be performed on it. Here each Task has a queue served by consumers. If Task_A should be performed only after Task_B if Task_B is requested on the data, how do I set-up such dependencies?

    Read the article

  • Is there an API for listing queues and exchanges on RabbitMQ?

    - by parsenome
    I've looked quite a bit, but I haven't been able to find a good programmatic way to list the queues on a RabbitMQ server. This is important because I need to clean up my queues and exchanges when I'm done with them. I don't always have a good "done" event that can be used to trigger a cleanup, so I'd like to do it with more of a garbage collection model. If I can list the queues, I can verify that the objects that they're related to shouldn't be producing more entries and clean them up. I know I can use rabbitmqctl to do it, but that needs elevated privileges. Since I haven't been able to find a way to list the queues programmatically, I've been keeping a list of names in the database. That works, but it's ugly.

    Read the article

1 2  | Next Page >