File: README.md

package info (click to toggle)
python-autobahn 17.10.1%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,452 kB
  • sloc: python: 22,598; javascript: 2,705; makefile: 497; sh: 3
file content (23 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
This shows how to use "retained" events as well as "event history".

The "backend.py" does some publishing to two different topics:
"com.example.history" and "com.example.no_history_here". The former
has event-history enabled (see the example router's config in the
"crossbardemo" realm).

When "frontend.py" attaches and subscribes to *either* of the two
topics, it will immediately receive the latest event.

After that, the WAMP Meta API is used to retrieve the event-history
from the "com.example.history" topic.

Things to try:

 - run backend.py, then run frontend.py in a new shell

 - run backend.py, kill it, then run frontend.py

 - with frontend.py running, kill and re-run backend.py several times

 - ...then try starting frontend.py again (which will show more events
   in the history