psmq-pub(1)

bofc manual pages

psmq-pub(1)



 

NAME

psmq-pub - helper tool to publish message on specific topic  

SYNOPSIS

psmq-pub [-h | -v]
psmq-pub -b name -t topic [-m message | -e | -B ] [-n mqueue-name] [-p prio]  

DESCRIPTION

-h
Prints short help and exits
-v
Prints version information and exits
-n mqueue-name
mqueue psmq-sub will create and use to communicate with broker. This argument is optional and by default /psmq_pub will be used.
-b name
mqueue name of the broker you want to use for communication. This option is mandatory
-t topic
topic you want message to be sent on. Note, you cannot use wildcards when publishing message.
-m message
message you want to publish. This is optional argument, if you don't pass it, program will read data from stdin. One psmq message will be sent per every new line. Input is read until end of file is encoutered.
-e
When set, a single message without payload will be sent on topic.
-B
When -B flag is passed, binary data is read from stdin. If data is too big and will not fit into single psmq frame, data will be split into multiple frames which will be delivered in order (unless other message is sent on the same topic in the same time).
-p prio
Priority of the message. Every message is sent with priority and broker will always send messages to receiving clients with highest priority first. Default priority is 0 if not specified. Higher values means higher priority. Priority is limited by system's implementation of mqueue. Please refer to it to see maximum priority value.
 

EXAMPLES

Send single message with default priority
psmq-pub -b/brok -t/topic1 -m "test message to send"
Publish content of the file with priority 5
cat file-with-content | psmq-pub -b/brok -t/topic1 -p5
Send sequence of binary data
printf "\x13\x37\x04\x51" | psmq-pub -b/brok -t/topic1 -B
 

BUG REPORTING

Please, report all bugs to "Michał Łyszczek <michal.lyszczek@bofc.pl>"  

SEE ALSO

psmqd(1), psmq-pub(1), psmq-sub(1), psmq_cleanup(3), psmq_init(3), psmq_publish(3), psmq_receive(3), psmq_subscribe(3), psmq_timedreceive(3), psmq_timedreceive_ms(3), psmq_unsubscribe(3), psmq_building(7), psmq_overview(7).

bofc.pl

19 May 2021 (v9999)

psmq-pub(1)