aboutsummaryrefslogtreecommitdiffstats
path: root/man/psmq-pub.1
blob: e486e19ad1497fbe4dfaea2fa7f983fae7797c23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
.TH "psmq-pub" "1" "19 May 2021 (v9999)" "bofc.pl"
.SH NAME
.PP
.B psmq-pub
- helper tool to publish message on specific topic
.SH SYNOPSIS
.PP
.B psmq-pub
.RB [ -h
|
.BR -v ]
.br
.B psmq-pub
.B -b
.I name
.B -t
.I topic
.RB [ -m
.IR message \ |
.BR -e \ | \ -B \ ]
.RB [ -n
.IR mqueue-name ]
.RB [ -p
.IR prio ]
.SH DESCRIPTION
.TP
.B -h
Prints short help and exits
.TP
.B -v
Prints version information and exits
.TP
.BI -n\  mqueue-name
mqueue
.B psmq-sub
will create and use to communicate with broker.
This argument is optional and by default
.B /psmq_pub
will be used.
.TP
.BI -b\  name
mqueue
.I name
of the broker you want to use for communication.
This option is mandatory
.TP
.BI -t\  topic
.I topic
you want message to be sent on.
Note, you cannot use wildcards when publishing message.
.TP
.BI -m\  message
.I message
you want to publish.
This is optional argument, if you don't pass it, program will read data
from stdin.
One
.B psmq
message will be sent per every new line.
Input is read until end of file is encoutered.
.TP
.B -e
When set, a single message without payload will be sent on
.IR topic .
.TP
.B -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).
.TP
.BI -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.
.SH EXAMPLES
.TP
Send single message with default priority
.B psmq-pub
-b/brok -t/topic1 -m "test message to send"
.TP
Publish content of the file with priority 5
cat file-with-content |
.B psmq-pub
-b/brok -t/topic1 -p5
.TP
Send sequence of binary data
printf "\\x13\\x37\\x04\\x51" |
.B psmq-pub
-b/brok -t/topic1
.SH "BUG REPORTING"
.PP
Please, report all bugs to "Michał Łyszczek <michal.lyszczek@bofc.pl>"
.SH "SEE ALSO"
.PP
.BR psmqd (1),
.BR psmq-pub (1),
.BR psmq-sub (1),
.BR psmq_cleanup (3),
.BR psmq_init (3),
.BR psmq_publish (3),
.BR psmq_receive (3),
.BR psmq_subscribe (3),
.BR psmq_timedreceive (3),
.BR psmq_timedreceive_ms (3),
.BR psmq_unsubscribe (3),
.BR psmq_building (7),
.BR psmq_overview (7).