Fail back to broker configuration for IPC clients

TomF
TomF Member, Employee Posts: 406 Solace Employee

If you need to set up IPC connections, you introduce dependencies in application start-up order and availability: if your IPC listener isn't up when your connection initiator starts, you get a failure.

To mitigate this, you might like the option of your IPC connection failing back to a broker connection. This ensures the connections are always made, but how to control this, so that you don't accidentally end up with broker connections?

The answer is to create a client-username for use with IPC clients. In normal operation, leave this shutdown, so that IPC clients don't accidentally connect to the broker. Then, specify the broker as the second connection in the host list. Examples using sdkperf:
sdkperf -cip=listen:localhost:port ... (IPC listener)
sdkperf -cip=shm:localhost:port,broker-ip:port -cu=ipc@message-vpn ... (IPC connection initiator)

The connection initiator will connect via IPC or fail. If you decide you want to enable broker connections, simply "no shutdown" the "ipc" client-username (you'll need to reconfigure the IPC listener to connect to the broker if that's what you'd like to do) Once you have the IPC listener running, you can shutdown the ipc client-username and the IPC connections will be made automatically!

Tagged:

Comments

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 914 admin

    Great - thanks for sharing @TomF !