how to execute exe file in publisher c#

87 views
Skip to first unread message

Jenil

unread,
Jan 11, 2022, 4:13:53 AM1/11/22
to rabbitmq-users
how to execute consumer.exe file in publisher code for c#

can anyone give me code for that?

Wes Peng

unread,
Jan 11, 2022, 4:21:24 AM1/11/22
to rabbitm...@googlegroups.com
Do you mean an external ".exe" file?
No. You should make your own producer and consumer program with the AMQP library for c#.
Please take a look at:

regards


On Tue, Jan 11, 2022 at 5:14 PM Jenil <jenilr...@gmail.com> wrote:
how to execute consumer.exe file in publisher code for c#

can anyone give me code for that?

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/df23fa3e-ac06-420a-ad50-b44c71561254n%40googlegroups.com.

Jenil

unread,
Jan 11, 2022, 4:44:18 AM1/11/22
to rabbitm...@googlegroups.com
Sir i know that but i need to execute consumers  .exe file into publisher code . So consumer automatic run when we run publisher. Otherwise we need to first run consumer then need to run publisher.


Wes Peng

unread,
Jan 11, 2022, 4:47:25 AM1/11/22
to rabbitm...@googlegroups.com
You can have both consumer and producer in the same client. But you should write the code using an existing AMQP library for the language, rather than calling an external ".exe" program.

regards.


Jenil

unread,
Jan 11, 2022, 4:51:56 AM1/11/22
to rabbitm...@googlegroups.com
Sir my publisher and consumer in the same client. For ex. If we want msg from publisher then first we run consumer code then we run publisher code  right?. I want the  code that run or execute consumer. Exe means consumer run in publisher code

Wes Peng

unread,
Jan 11, 2022, 4:56:58 AM1/11/22
to rabbitm...@googlegroups.com
You are maybe a bit confused on rabbitmq. The publishing and consuming are in aysnc mode. You just publish messages to the broker, and messages will be held in the queues. When your consumer connects to the queue, the messages will be fetched.
The producer and consumer are totally decoupled. 
If you want the communication to be in sync mode, you should use a RPC framework.

Thanks.

Jenil

unread,
Jan 11, 2022, 5:10:57 AM1/11/22
to rabbitm...@googlegroups.com
Yes sir i understand that what you are saying, but first we need to run consumer so that consumer check weather queue is exist or not then we run publisher to publish message to the queue the  consumer receive messages.. In this step we need to run consumer and publisher both code separately. But i want to execute consumer or consumer. Exe file into the publisher side so only I need to run publisher and consumer. Exe file will run in publisher code so consumer Will automatically run or we not need to run consumer separately. 

Hope you understand my question. 

Regards. 

Wes Peng

unread,
Jan 11, 2022, 5:13:44 AM1/11/22
to rabbitm...@googlegroups.com
You can always call the method to create queues even if they already exist.
Make sure every creation is using the same metadata you defined the first time.

Jenil

unread,
Jan 11, 2022, 5:16:14 AM1/11/22
to rabbitm...@googlegroups.com
Yes but i don't know about that code . Can you tell me that code for the use of exe file of consumer


Wes Peng

unread,
Jan 11, 2022, 5:18:16 AM1/11/22
to rabbitm...@googlegroups.com
I am not sure... but is it a system call such as system("consumer.exe") in your code? if you really want to call an external program...

Thanks

Jenil

unread,
Jan 11, 2022, 5:25:05 AM1/11/22
to rabbitm...@googlegroups.com
My question like execute exe threw publisher. I want that code sir

Jenil

unread,
Jan 11, 2022, 6:05:33 AM1/11/22
to rabbitm...@googlegroups.com
Sir Can you help for that code. I used code but exception throwes

Wes Peng

unread,
Jan 11, 2022, 6:54:54 AM1/11/22
to rabbitm...@googlegroups.com
You should paste the error details here so that the people on this list can help you.

Jenil

unread,
Jan 11, 2022, 7:13:38 AM1/11/22
to rabbitm...@googlegroups.com
Kaagaz_20220111_174234542721.pdf
Reply all
Reply to author
Forward
0 new messages