Comments (3)
Does amqp_channel_open and amqp_channel_close need called in every operation, likes in amqp_exchange_declare, amqp_queue_declare, amqp_queue_bind, amqp_queue_unbind, amqp_queue_delete,amqp_basic_publish,amqp_basic_consume?
amqp_exchange_declare (and friends) need an open channel, that channel may be reused between different calls, so there is no reason to close the channel after each call. A channel may be closed by the server if one of those calls fails. If the server indicates that the channel is closed, you'll need to open a new channel before calling any new functions that require a channel.
Does amqp_basic_publish have rpc reply from rabbitmq server? I am not find in example
By default amqp_basic_publish does not get an rpc-reply from the server. You can enable publisher confirms, in which the server will send a basic.ack method when back to the client after it has successfully processed a message. https://github.com/alanxz/rabbitmq-c/blob/master/examples/amqp_producer.c has a small example where publisher confirms are not enabled
If amqp_queue_bind return NULL,i find two proccess, below . Does amqp_get_rpc_reply realy get something from rabbitmq server when amqp_queue_bind returns NULL?
If amqp_queue_bind returns NULL, you will need to use amqp_get_rpc_reply to understand why it failed, this may be due to the server returning an error.
from rabbitmq-c.
Thank you very much.
By default amqp_basic_publish does not get an rpc-reply from the server. You can enable publisher confirms, in which the server will send a basic.ack method when back to the client after it has successfully processed a message. https://github.com/alanxz/rabbitmq-c/blob/master/examples/amqp_producer.c has a small example where publisher confirms are not enabled
If publisher confirms are not enabled, amqp_basic_publish does not get an rpc-reply from the server, amqp_get_rpc_reply was called anyway. Will the process be blocked by this call?
If amqp_queue_bind returns NULL, you will need to use amqp_get_rpc_reply to understand why it failed, this may be due to the server returning an error.
If amqp_queue_bind return success, do i need to call amqp_get_rpc_reply? I have known the result, but if i no need to call amqp_get_rpc_reply,will some rpc reply be left in rabbitmq client or connection?
from rabbitmq-c.
If amqp_queue_bind return success, do i need to call amqp_get_rpc_reply?
No, you only need to call it when amqp_queue_bind returns NULL.
from rabbitmq-c.
Related Issues (20)
- rabbitmq-c/export.h”: No such file or directory HOT 4
- How to Check if RabbitMQ Server is Configured Before Binding Queues and Notifications? HOT 2
- Hello, utils. c is missing two functions now_ Microseconds and microsleeps HOT 1
- amqp_ssl_socket_close intermittent crash HOT 2
- Duplicate connection and channel HOT 2
- amqp_channel_flow usage to indicate for publisher that queue is not ready
- Memory leak in amqp_consume_message! HOT 3
- OpenSsl v3.x fips mode question. HOT 3
- Using Update_Secret method : COMMAND_INVALID - unimplemented method HOT 2
- Can I use a proxy? HOT 1
- RabbitMQ C installed but not detectable by the system (WSL Ubuntu-22.04) HOT 1
- Request for Support to Set the connection_name Property HOT 1
- When closing MQ Connection getting "An unexpected method was received" error HOT 2
- Any expectations for a new release?
- Pass properties to process spawned by tools/consume
- socket Recv-Q memory leak
- build with boost 1.53.0 class boost::optional HOT 1
- [QUESTION]: amqp_queue_declare() waits infinitely HOT 2
- Incorrect README.md statement HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rabbitmq-c.