Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple receivers on a topic with the same message queue name (iox::runtime::PoshRuntime::getInstance("/xxx"))? #35

Closed
callalilychen opened this issue Jan 21, 2020 · 3 comments
Labels
question Further information is requested

Comments

@callalilychen
Copy link

callalilychen commented Jan 21, 2020

I get the following error message, when I try to start an example subscriber multiple times:

$ ./build/iceoryx_examples/icedelivery/ice-subscriber-bare-metal 
Receiving: 1249
Receiving: 1250
Receiving: 1251

$ ./build/iceoryx_examples/icedelivery/ice-subscriber-bare-metal
2020-01-22 00:45:03.179 [Warning]: MQ still there, doing an unlink of /subscriber-bare-metal
2020-01-22 00:45:33.183 [ Error ]: ICEORYX error! MQ_INTERFACE__REG_ACK_NO_RESPONSE
ice-subscriber-bare-metal: /home/wenwen/tools/iceoryx-rs/iceoryx/iceoryx_utils/source/error_handling/error_handling.cpp:53: static void iox::ErrorHandler::ReactOnErrorLevel(iox::ErrorLevel, const char*): Assertion `false' failed.
fish: “./build/iceoryx_examples/icedel…” terminated by signal SIGABRT (Abort)

Is it possible to support multiple receivers on a topic with the same message queue name? Or it is not allowed because of some good reasons? Better error message for such "misuse" would be very nice.

@elBoberido
Copy link
Member

After some thinking, this is probably something the application should take care of.
The MQ_APP_NAME from iox::runtime::PoshRuntime::getInstance("/xxx") is the name of the message queue which will be opened by the application before it registers at RouDi.
The application could just append the PID to MQ_APP_NAME.
Be carefully though, if the application has a publisher, there might be strange behaviour until #25 is fixed.

@mossmaurice mossmaurice added the question Further information is requested label Jan 22, 2020
@budrus
Copy link
Contributor

budrus commented Jan 22, 2020

Good point @callalilychen .

You can have multiple receivers/subscribers on a topic but each application must register with a unique name. The RouDi daemon prints a warning but the error message on the application side should be clearer.

You could append an instance ID that you provide as command line parameter. The proposal of @elBoberido would also be an option. But then you maybe would not recognize it if you accidentally start an application twice. If #25 is implemented you would then have two writers on the same topic. If this is not what you had in mind it may took a while until you have deciphered the puzzle ;-)

@mossmaurice
Copy link
Contributor

As #25 is nearly done and iceoryx 1.0 on the horizon, I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants