subscribeBlob method

void subscribeBlob (String id, String destination, void onMessage(Map<String, String> headers, Stream<List<int>> message), { Ack ack: AUTO, String receipt, Matcher matcher: exact, Map extraHeaders })

Subscribes for listening to a given destination.

  • Like sendBlob, it is useful if you'd like to receive a huge amount of
  • message (without storing them in memory first).
  • stomp.subscribe("/foo/blob", (Stream<List<int>> stream) {
    
  •   stream.listen((List<int> message) {
    
  •     //handle message
    
  •   }, onDone: () {
    
  •     //handle done
    
  •   });
    
  • });
    
    • id - specifies the id of the subscription, an arbitrary string.
  • It must be unique for each StompClient (until unsubscribe is called).
    • destination - specifies the destination to subscribe.
    • matcher - matches destination with the message's destination.
    • extraHeaders - additional headers to be sent while subscribing.
  • If omitted, exact is assumed.
  • If you'd like to specify a regular expression in destination,
  • you can use regExp. For GLOB pattern, use glob.
  • If you'd like to ignore the destination, use all.

Implementation

void subscribeBlob(String id, String destination,
    void onMessage(Map<String, String> headers, Stream<List<int>> message),
    {Ack ack: AUTO,
    String receipt,
    Matcher matcher: exact,
    Map extraHeaders});