Comments (6)
I'll take a look later this evening.
from autobahn-cpp.
Without digging at all: is it just where the message-numbers start? Bonefish rejects 0 so the numbers must start at 1 (AutobahnPython was starting at 0, which meant "nothing" worked w/ bonefish).
from autobahn-cpp.
I ran the example code without modification and it publish only once. I cannot verify with if this is an issue similar to one in AutobahnPython crossbario/autobahn-python#541
from autobahn-cpp.
If you look at the publisher code it only publishes once and then returns from main so that is expected behaviour. I am not seeing any issues here. I am testing against latest bonefish
and AutobahnCpp
.
Bonefish Output
dchappelle@orion:build$ ./daemon/bonefish -r default -t 9000 -d
[rawsocket_server_impl.cpp:94][start] starting rawsocket server
[wamp_message_processor.cpp:46][process_message] processing message: hello
[wamp_router_impl.cpp:107][attach_session] attaching session: session [7090515283965860,default,none]
[wamp_dealer.cpp:62][attach_session] attach session: session [7090515283965860,default,none]
[wamp_broker.cpp:51][attach_session] attach session: session [7090515283965860,default,none]
[wamp_router_impl.cpp:163][process_hello_message] session [7090515283965860,default,none], hello [default, {"roles":{"caller":{"features":{"call_timeout":true}}, "callee":{"features":{"call_timeout":true}}, "publisher":{}, "subscriber":{}}}]
[wamp_router_impl.cpp:191][process_hello_message] session [7090515283965860,default,open], welcome [7090515283965860, {"roles":{"dealer":{"features":{"call_timeout":true}}, "broker":{}}}]
[rawsocket_transport.cpp:39][send_message] sending message: welcome
[wamp_message_processor.cpp:46][process_message] processing message: subscribe
[wamp_broker.cpp:163][process_subscribe_message] session [7090515283965860,default,open], subscribe [1, {}, com.examples.subscriptions.topic1]
[wamp_broker.cpp:196][process_subscribe_message] session [7090515283965860,default,open], subscribed [1, 1]
[rawsocket_transport.cpp:39][send_message] sending message: subscribed
[wamp_message_processor.cpp:46][process_message] processing message: hello
[wamp_router_impl.cpp:107][attach_session] attaching session: session [2257228500326156,default,none]
[wamp_dealer.cpp:62][attach_session] attach session: session [2257228500326156,default,none]
[wamp_broker.cpp:51][attach_session] attach session: session [2257228500326156,default,none]
[wamp_router_impl.cpp:163][process_hello_message] session [2257228500326156,default,none], hello [default, {"roles":{"caller":{"features":{"call_timeout":true}}, "callee":{"features":{"call_timeout":true}}, "publisher":{}, "subscriber":{}}}]
[wamp_router_impl.cpp:191][process_hello_message] session [2257228500326156,default,open], welcome [2257228500326156, {"roles":{"dealer":{"features":{"call_timeout":true}}, "broker":{}}}]
[rawsocket_transport.cpp:39][send_message] sending message: welcome
[wamp_message_processor.cpp:46][process_message] processing message: publish
[wamp_broker.cpp:108][process_publish_message] session [2257228500326156,default,open], publish [1, {}, com.examples.subscriptions.topic1, ["hello"], nil]
[wamp_broker.cpp:141][process_publish_message] session [7090515283965860,default,open], event [1, 7090515283965860, {}, ["hello"], nil]
[rawsocket_transport.cpp:39][send_message] sending message: event
[wamp_message_processor.cpp:46][process_message] processing message: goodbye
[wamp_router_impl.cpp:211][process_goodbye_message] session [2257228500326156,default,closed], goodbye [{}, wamp.error.close_realm]
[rawsocket_transport.cpp:39][send_message] sending message: goodbye
[wamp_dealer.cpp:79][detach_session] detach session: session [2257228500326156,default,closed]
[wamp_dealer.cpp:84][detach_session] cleaning up session registrations
[wamp_dealer.cpp:113][detach_session] cleaning up pending caller invocations
[wamp_dealer.cpp:133][detach_session] cleaning up pending callee invocations
[wamp_broker.cpp:66][detach_session] detach session: 0x1ec5800
[rawsocket_connection.hpp:302][handle_system_error] connection closed: asio.misc:2
AutobahnCpp Subscriber Output
dchappelle@orion:build$ ./examples/subscriber -d -p 9000
realm: default
starting io service
connected to server
RawSocket handshake reply received
rawsocket handshake: using msgpack serializer
rawsocket handshake: start wamp async
RX preparing to receive message ..
session started
TX message (105 octets) ...
TX message sent (109 / 109 octets)
RX message (59 octets) ...
RX message received.
RX WAMP message: [2, 7090515283965860, {"roles"=>{"dealer"=>{"features"=>{"call_timeout"=>true}}, "broker"=>{}}}]
RX preparing to receive message ..
joined realm: 7090515283965860
TX message (39 octets) ...
TX message sent (43 / 43 octets)
RX message (4 octets) ...
RX message received.
RX WAMP message: [33, 1, 1]
RX preparing to receive message ..
RX message (20 octets) ...
RX message received.
RX WAMP message: [36, 1, 7090515283965860, {}, ["hello"]]
Warning: event handler threw exception
RX preparing to receive message ..
AutobahnCpp Publisher Output
dchappelle@orion:build$ ./examples/publisher -d -p 9000
starting io service
connected to server
RawSocket handshake reply received
rawsocket handshake: using msgpack serializer
rawsocket handshake: start wamp async
RX preparing to receive message ..
session started
TX message (105 octets) ...
TX message sent (109 / 109 octets)
RX message (59 octets) ...
RX message received.
RX WAMP message: [2, 2257228500326156, {"roles"=>{"dealer"=>{"features"=>{"call_timeout"=>true}}, "broker"=>{}}}]
RX preparing to receive message ..
joined realm: 2257228500326156
event published
TX message (46 octets) ...
TX message sent (50 / 50 octets)
TX message (26 octets) ...
TX message sent (30 / 30 octets)
RX message (30 octets) ...
RX message received.
RX WAMP message: [6, {}, "wamp.error.goodbye_and_out"]
RX preparing to receive message ..
left session (wamp.error.goodbye_and_out)
stopped io service
stopped session
FWIW the caller and callee examples are also working for me as expected.
from autobahn-cpp.
Oh I just missed -d options thats made it look like theres no output at all. Thanks
from autobahn-cpp.
Im reopening again since I see still there is something not working. If you see the subsriber example code.
void topic1(const autobahn::wamp_event& event) {
std::cerr << "received event: " << event.argument<uint64_t>(0) << std::endl;
}
you never see this calback topic1 being called when using cpp publisher example but it works perfectly when using a python publisher.
For Cpp Publisher You get an exception in AutobahnCpp Subscriber
Warning: event handler threw exception
For Python Publisher I get this message in AutobahnCpp Subscriber
received event 1
from autobahn-cpp.
Related Issues (20)
- How to use same session for calling different remote procedure HOT 1
- Content of CALL error not compatible with other WAMP clients HOT 1
- Exporting autobahn_cpp interface
- CMake installation skips two files HOT 3
- Rel 20.8.1 HOT 2
- Create single-threaded concurrent caller example HOT 2
- C++20-only? HOT 2
- Publish to conan.io/center HOT 3
- Run examples in CI
- Build and publish docs as part of CI
- 404 on Example Code in Documentation
- make methods on_ws_... protected on wamp_websocketpp_websocket_transport HOT 3
- send_message on wamp_session::process_goodbye throws always HOT 5
- reconnection could be handled when the need is directly noticed on transport level
- WampRawSocketServerProtocol.stringReceived: WAMP ProtocolError - aborting connection! HOT 8
- How to get map with C++ API
- Failing WebSocket connection (code=1002) HOT 2
- wamp_session::process_challenge protocol_error throws will crash the application HOT 6
- Handling IP addresses in provided procedures HOT 2
- Correct copyright holder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autobahn-cpp.