File: publishers.textile

package info (click to toggle)
libnginx-mod-http-push-stream 0.6.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,272 kB
  • sloc: ruby: 7,101; ansic: 6,048; javascript: 2,121; sh: 53; makefile: 16
file content (75 lines) | stat: -rw-r--r-- 2,504 bytes parent folder | download
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
h1(#publishers_configuration). Publishers Configuration

h2(#push_stream_publisher). push_stream_publisher <a name="push_stream_publisher" href="#">&nbsp;</a>

*syntax:* _push_stream_publisher [normal | admin]_

*default:* _normal_

*context:* _location_

Defines a location as a message publisher. Requests to a publisher location are treated as messages to be sent to subscribers.
This location supports the following http methods:
GET, make possible to get statistics about the channel
POST/PUT, publish a message to the channel
DELETE, remove any existent stored messages, disconnect any subscriber, and delete the channel. Available only if _admin_ value is used in this directive.

<pre>
  # normal publisher location
  location /pub {
      push_stream_publisher;
      push_stream_channels_path               $arg_id;
  }

  # GET    /pub?id=channel_id -> get statistics about a channel
  # POST   /pub?id=channel_id -> publish a message to the channel

  # admin publisher location
  location /pub_admin {
      push_stream_publisher                   admin;
      push_stream_channels_path               $arg_id;
  }

  # GET    /pub_admin?id=channel_id -> get statistics about a channel
  # POST   /pub_admin?id=channel_id -> publish a message to the channel
  # DELETE /pub_admin?id=channel_id -> delete the channel
</pre>


h2(#push_stream_channels_path). push_stream_channels_path <a name="push_stream_channels_path" href="#">&nbsp;</a>

*values:* _channel id_

*location:* _push_stream_publisher, push_stream_channels_statistics_

A string to uniquely identify a communication channel. Must be present on location of the push_stream_publisher and push_stream_channels_statistics.

<pre>
push_stream_channels_path $arg_id;
#channel id is now the url query string parameter "id"
#(/pub?id=channel_id_string or /channels-stats?id=channel_id_string)
</pre>


h2(#push_stream_store_messages). push_stream_store_messages <a name="push_stream_store_messages" href="#">&nbsp;</a>

*syntax:* _push_stream_store_messages on | off_

*default:* _off_

*context:* _location (push_stream_publisher)_

Whether or not message queuing is enabled.


h2(#push_stream_channel_info_on_publish). push_stream_channel_info_on_publish <a name="push_stream_channel_info_on_publish" href="#">&nbsp;</a>

*syntax:* _push_stream_channel_info_on_publish on | off_

*default:* _on_

*context:* _location (push_stream_publisher)_

*release version:* _0.3.5_

Enable send back channel information after publish a message.