Community,
I want to use
/subscribe
a to a pub
-socket on a server that implements ZeroMQ (dartzmq/install
Best regards
CodePudding user response:
Q1 :
"Is it possible to connect to a ZeroMQ-Publisher-Socket WITHOUT implementing or depending on the C compiled file of ZeroMQ?"
A1 :
Yes, it is. It is quite enough to re-implement the published ZeroMQ ZMTP RFC-s relevant for the use-case & your code is granted to become interoperable, irrespective of the implementation language / deployment ecosystem, if it meets all the ZMTP RFC-s' mandatory requirements. So it is doable.
Q2 :
"... ZeroMQ uses it's own protocoll (please verify)."
A2 :
No, in the sense of OSI-ISO-L2/L3 stack.
Yes, in the sense of higher layer application-driven protocols, where the ZMTP RFC-s apply for the most of the ZeroMQ Scalable Formal Communication Patterns' Archetypes ( may read more on ZeroMQ sockets are not sockets as you know 'em ), yet there are also tools to interface with O/S plan-sockets' fd
-s, where needed. Still A1 applies here.
Q3 :
"Can I subscribe to a ZeroMQ-Publisher-Socket with ...? If yes, how?"
A3 :
Yes, it possible when your code follows the published ZMTP RFC-s. Implement all ZMTP RFC-s' mandatory properties & you are granted an interoperability with any other, ZeroMQ-ZMTP-RFC-s' compliant, node.
Q4 :
"Are there alternatives?"
A4 :
Yes, if your design can extend the Server-side, adding another AccessPoint-s there, using ZMQ_STREAM
Scalable Formal Communication Archetype there, may reduce your Flutter-side scope of ZMTP RFC-s needed, as interfacing to native plain-socket will be the only one to handle and the "functionality gap" thereof can be handled on the Server-side of the link ( easily handling all the subscription management & message filtering, that must meet the ZeroMQ ZMTP RFC-s, so why not tandem it inside the Server-side before connecting the down-stream to Flutter App - smart, isn't it? )