Skip to content

dev branch - mosquitto_pub to multiple topics #323

@filecommander

Description

@filecommander

mosquitto_pub does not support publishing a message to multiple topics

See
cyphernode/cyphernodeconf_docker/templates/bitcoin/blocknotify.sh
cyphernode/cyphernodeconf_docker/templates/bitcoin/walletnotify.sh

A fix has to be made to invoke mosquitto_pub 2 times - on each topic:

  # Topic 'newblock' will be removed eventually
  echo "[blocknotify-$$] mosquitto_pub -h broker -t newblock -t bitcoinnode/newblock -m \"{\"blockhash\":\"${blockhash}\",\"blockheight\":${blockheight}}\""
  mosquitto_pub -h broker -t newblock -m "{\"blockhash\":\"${blockhash}\",\"blockheight\":${blockheight}}"
  mosquitto_pub -h broker -t bitcoinnode/newblock -m "{\"blockhash\":\"${blockhash}\",\"blockheight\":${blockheight}}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions