How to make RabbitMQ worker listening continuously

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

How to make RabbitMQ worker listening continuously

Ravi Pandey

Hi I am implementing rabbitMQ with more than 3 workers processing. To test it i need to execute worker file each time but i don't want that.

I want my worker script to listen all request continuously without manually executing worker file. Many people suggested CRON but I don't want because if previous run hasn't finished then overlap can cause serious issues.

Is there any way to run my worker script continuously in background?


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to make RabbitMQ worker listening continuously

michaelklishin

2014-04-07 10:07 GMT+04:00 Ravi Pandey <[hidden email]>:

I want my worker script to listen all request continuously without manually executing worker file. Many people suggested CRON but I don't want because if previous run hasn't finished then overlap can cause serious issues.

Is there any way to run my worker script continuously in background?


It depends on the language and client used. What do you use? Do you consume using basic.consume or basic.get?
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to make RabbitMQ worker listening continuously

Ravi Pandey
I am using PHP with basic.consume


On Mon, Apr 7, 2014 at 12:06 PM, Michael Klishin <[hidden email]> wrote:

2014-04-07 10:07 GMT+04:00 Ravi Pandey <[hidden email]>:

I want my worker script to listen all request continuously without manually executing worker file. Many people suggested CRON but I don't want because if previous run hasn't finished then overlap can cause serious issues.

Is there any way to run my worker script continuously in background?


It depends on the language and client used. What do you use? Do you consume using basic.consume or basic.get?
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to make RabbitMQ worker listening continuously

Alvaro Videla-2
Hi,

Have you seen the examples here:
https://github.com/videlalvaro/php-amqplib/tree/master/demo, specially
this one https://github.com/videlalvaro/php-amqplib/blob/master/demo/amqp_consumer.php
?

This is also explained in our tutorials:
http://www.rabbitmq.com/tutorials/tutorial-one-php.html

Regards,

Alvaro

On Mon, Apr 7, 2014 at 9:21 AM, Ravi Pandey
<[hidden email]> wrote:

> I am using PHP with basic.consume
>
>
> On Mon, Apr 7, 2014 at 12:06 PM, Michael Klishin
> <[hidden email]> wrote:
>>
>>
>> 2014-04-07 10:07 GMT+04:00 Ravi Pandey <[hidden email]>:
>>
>>> I want my worker script to listen all request continuously without
>>> manually executing worker file. Many people suggested CRON but I don't want
>>> because if previous run hasn't finished then overlap can cause serious
>>> issues.
>>>
>>> Is there any way to run my worker script continuously in background?
>>
>>
>> It depends on the language and client used. What do you use? Do you
>> consume using basic.consume or basic.get?
>> --
>> MK
>>
>> http://github.com/michaelklishin
>> http://twitter.com/michaelklishin
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> [hidden email]
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> [hidden email]
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to make RabbitMQ worker listening continuously

Ravi Pandey
Yes I am using this library but first I need to run amqp_consumer.php manually to process all messages and I don't want to execute amqp_consumer.php file manually everytime.


On Mon, Apr 7, 2014 at 1:00 PM, Alvaro Videla <[hidden email]> wrote:
Hi,

Have you seen the examples here:
https://github.com/videlalvaro/php-amqplib/tree/master/demo, specially
this one https://github.com/videlalvaro/php-amqplib/blob/master/demo/amqp_consumer.php
?

This is also explained in our tutorials:
http://www.rabbitmq.com/tutorials/tutorial-one-php.html

Regards,

Alvaro

On Mon, Apr 7, 2014 at 9:21 AM, Ravi Pandey
<[hidden email]> wrote:
> I am using PHP with basic.consume
>
>
> On Mon, Apr 7, 2014 at 12:06 PM, Michael Klishin
> <[hidden email]> wrote:
>>
>>
>> 2014-04-07 10:07 GMT+04:00 Ravi Pandey <[hidden email]>:
>>
>>> I want my worker script to listen all request continuously without
>>> manually executing worker file. Many people suggested CRON but I don't want
>>> because if previous run hasn't finished then overlap can cause serious
>>> issues.
>>>
>>> Is there any way to run my worker script continuously in background?
>>
>>
>> It depends on the language and client used. What do you use? Do you
>> consume using basic.consume or basic.get?
>> --
>> MK
>>
>> http://github.com/michaelklishin
>> http://twitter.com/michaelklishin
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> [hidden email]
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> [hidden email]
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to make RabbitMQ worker listening continuously

Kamil Kieliszczyk
Have you read this?
http://www.rabbitmq.com/tutorials/tutorial-one-php.html



On 04/07/2014 09:41 AM, Ravi Pandey wrote:
Yes I am using this library but first I need to run amqp_consumer.php manually to process all messages and I don't want to execute amqp_consumer.php file manually everytime.


On Mon, Apr 7, 2014 at 1:00 PM, Alvaro Videla <[hidden email]> wrote:
Hi,

Have you seen the examples here:
https://github.com/videlalvaro/php-amqplib/tree/master/demo, specially
this one https://github.com/videlalvaro/php-amqplib/blob/master/demo/amqp_consumer.php
?

This is also explained in our tutorials:
http://www.rabbitmq.com/tutorials/tutorial-one-php.html

Regards,

Alvaro

On Mon, Apr 7, 2014 at 9:21 AM, Ravi Pandey
<[hidden email]> wrote:
> I am using PHP with basic.consume
>
>
> On Mon, Apr 7, 2014 at 12:06 PM, Michael Klishin
> <[hidden email]> wrote:
>>
>>
>> 2014-04-07 10:07 GMT+04:00 Ravi Pandey <[hidden email]>:
>>
>>> I want my worker script to listen all request continuously without
>>> manually executing worker file. Many people suggested CRON but I don't want
>>> because if previous run hasn't finished then overlap can cause serious
>>> issues.
>>>
>>> Is there any way to run my worker script continuously in background?
>>
>>
>> It depends on the language and client used. What do you use? Do you
>> consume using basic.consume or basic.get?
>> --
>> MK
>>
>> http://github.com/michaelklishin
>> http://twitter.com/michaelklishin
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> [hidden email]
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> [hidden email]
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to make RabbitMQ worker listening continuously

Alvaro Videla-2
In reply to this post by Ravi Pandey
If I understand you correctly, then you are probably looking for this
tool: http://supervisord.org/

On Mon, Apr 7, 2014 at 9:41 AM, Ravi Pandey
<[hidden email]> wrote:

> Yes I am using this library but first I need to run amqp_consumer.php
> manually to process all messages and I don't want to execute
> amqp_consumer.php file manually everytime.
>
>
> On Mon, Apr 7, 2014 at 1:00 PM, Alvaro Videla <[hidden email]> wrote:
>>
>> Hi,
>>
>> Have you seen the examples here:
>> https://github.com/videlalvaro/php-amqplib/tree/master/demo, specially
>> this one
>> https://github.com/videlalvaro/php-amqplib/blob/master/demo/amqp_consumer.php
>> ?
>>
>> This is also explained in our tutorials:
>> http://www.rabbitmq.com/tutorials/tutorial-one-php.html
>>
>> Regards,
>>
>> Alvaro
>>
>> On Mon, Apr 7, 2014 at 9:21 AM, Ravi Pandey
>> <[hidden email]> wrote:
>> > I am using PHP with basic.consume
>> >
>> >
>> > On Mon, Apr 7, 2014 at 12:06 PM, Michael Klishin
>> > <[hidden email]> wrote:
>> >>
>> >>
>> >> 2014-04-07 10:07 GMT+04:00 Ravi Pandey <[hidden email]>:
>> >>
>> >>> I want my worker script to listen all request continuously without
>> >>> manually executing worker file. Many people suggested CRON but I don't
>> >>> want
>> >>> because if previous run hasn't finished then overlap can cause serious
>> >>> issues.
>> >>>
>> >>> Is there any way to run my worker script continuously in background?
>> >>
>> >>
>> >> It depends on the language and client used. What do you use? Do you
>> >> consume using basic.consume or basic.get?
>> >> --
>> >> MK
>> >>
>> >> http://github.com/michaelklishin
>> >> http://twitter.com/michaelklishin
>> >>
>> >> _______________________________________________
>> >> rabbitmq-discuss mailing list
>> >> [hidden email]
>> >> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >>
>> >
>> >
>> > _______________________________________________
>> > rabbitmq-discuss mailing list
>> > [hidden email]
>> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> [hidden email]
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> [hidden email]
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to make RabbitMQ worker listening continuously

Ravi Pandey
Yes - I assumed RabbitMQ is providing this functionality as RabbitMQ server is running continuously in background. Doesn't it? 


On Mon, Apr 7, 2014 at 1:44 PM, Alvaro Videla <[hidden email]> wrote:
If I understand you correctly, then you are probably looking for this
tool: http://supervisord.org/

On Mon, Apr 7, 2014 at 9:41 AM, Ravi Pandey
<[hidden email]> wrote:
> Yes I am using this library but first I need to run amqp_consumer.php
> manually to process all messages and I don't want to execute
> amqp_consumer.php file manually everytime.
>
>
> On Mon, Apr 7, 2014 at 1:00 PM, Alvaro Videla <[hidden email]> wrote:
>>
>> Hi,
>>
>> Have you seen the examples here:
>> https://github.com/videlalvaro/php-amqplib/tree/master/demo, specially
>> this one
>> https://github.com/videlalvaro/php-amqplib/blob/master/demo/amqp_consumer.php
>> ?
>>
>> This is also explained in our tutorials:
>> http://www.rabbitmq.com/tutorials/tutorial-one-php.html
>>
>> Regards,
>>
>> Alvaro
>>
>> On Mon, Apr 7, 2014 at 9:21 AM, Ravi Pandey
>> <[hidden email]> wrote:
>> > I am using PHP with basic.consume
>> >
>> >
>> > On Mon, Apr 7, 2014 at 12:06 PM, Michael Klishin
>> > <[hidden email]> wrote:
>> >>
>> >>
>> >> 2014-04-07 10:07 GMT+04:00 Ravi Pandey <[hidden email]>:
>> >>
>> >>> I want my worker script to listen all request continuously without
>> >>> manually executing worker file. Many people suggested CRON but I don't
>> >>> want
>> >>> because if previous run hasn't finished then overlap can cause serious
>> >>> issues.
>> >>>
>> >>> Is there any way to run my worker script continuously in background?
>> >>
>> >>
>> >> It depends on the language and client used. What do you use? Do you
>> >> consume using basic.consume or basic.get?
>> >> --
>> >> MK
>> >>
>> >> http://github.com/michaelklishin
>> >> http://twitter.com/michaelklishin
>> >>
>> >> _______________________________________________
>> >> rabbitmq-discuss mailing list
>> >> [hidden email]
>> >> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >>
>> >
>> >
>> > _______________________________________________
>> > rabbitmq-discuss mailing list
>> > [hidden email]
>> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> [hidden email]
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> [hidden email]
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: How to make RabbitMQ worker listening continuously

Alvaro Videla-2
RabbitMQ is running in the background, yes, but it has nothing to do
on how you run your own workers. This is not related to PHP, Java or
any other language on which you implement your workers. You have to
decide how you want to run them. RabbitMQ will *just* take care of
passing the messages around, (plus durability guarantees and so on).

On Mon, Apr 7, 2014 at 11:17 AM, Ravi Pandey
<[hidden email]> wrote:

> Yes - I assumed RabbitMQ is providing this functionality as RabbitMQ server
> is running continuously in background. Doesn't it?
>
>
> On Mon, Apr 7, 2014 at 1:44 PM, Alvaro Videla <[hidden email]> wrote:
>>
>> If I understand you correctly, then you are probably looking for this
>> tool: http://supervisord.org/
>>
>> On Mon, Apr 7, 2014 at 9:41 AM, Ravi Pandey
>> <[hidden email]> wrote:
>> > Yes I am using this library but first I need to run amqp_consumer.php
>> > manually to process all messages and I don't want to execute
>> > amqp_consumer.php file manually everytime.
>> >
>> >
>> > On Mon, Apr 7, 2014 at 1:00 PM, Alvaro Videla <[hidden email]>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> Have you seen the examples here:
>> >> https://github.com/videlalvaro/php-amqplib/tree/master/demo, specially
>> >> this one
>> >>
>> >> https://github.com/videlalvaro/php-amqplib/blob/master/demo/amqp_consumer.php
>> >> ?
>> >>
>> >> This is also explained in our tutorials:
>> >> http://www.rabbitmq.com/tutorials/tutorial-one-php.html
>> >>
>> >> Regards,
>> >>
>> >> Alvaro
>> >>
>> >> On Mon, Apr 7, 2014 at 9:21 AM, Ravi Pandey
>> >> <[hidden email]> wrote:
>> >> > I am using PHP with basic.consume
>> >> >
>> >> >
>> >> > On Mon, Apr 7, 2014 at 12:06 PM, Michael Klishin
>> >> > <[hidden email]> wrote:
>> >> >>
>> >> >>
>> >> >> 2014-04-07 10:07 GMT+04:00 Ravi Pandey
>> >> >> <[hidden email]>:
>> >> >>
>> >> >>> I want my worker script to listen all request continuously without
>> >> >>> manually executing worker file. Many people suggested CRON but I
>> >> >>> don't
>> >> >>> want
>> >> >>> because if previous run hasn't finished then overlap can cause
>> >> >>> serious
>> >> >>> issues.
>> >> >>>
>> >> >>> Is there any way to run my worker script continuously in
>> >> >>> background?
>> >> >>
>> >> >>
>> >> >> It depends on the language and client used. What do you use? Do you
>> >> >> consume using basic.consume or basic.get?
>> >> >> --
>> >> >> MK
>> >> >>
>> >> >> http://github.com/michaelklishin
>> >> >> http://twitter.com/michaelklishin
>> >> >>
>> >> >> _______________________________________________
>> >> >> rabbitmq-discuss mailing list
>> >> >> [hidden email]
>> >> >> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >> >>
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > rabbitmq-discuss mailing list
>> >> > [hidden email]
>> >> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >> >
>> >> _______________________________________________
>> >> rabbitmq-discuss mailing list
>> >> [hidden email]
>> >> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >
>> >
>> >
>> > _______________________________________________
>> > rabbitmq-discuss mailing list
>> > [hidden email]
>> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> [hidden email]
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> [hidden email]
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss