# Set ZeroMQ subscribe channel in Mathematica?

**URL:** <https://community.wolfram.com/t/set-zeromq-subscribe-channel-in-mathematica/11287>\
**Category:** Questions\
**Tags:** external-interfaces, connected-devices\
**Created:** [September 20, 2017, 8:48am UTC](https://community.wolfram.com/t/set-zeromq-subscribe-channel-in-mathematica/11287 "2017-09-20T08:48:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hliu1020](https://avatars.discourse-cdn.com/v4/letter/h/3ec8ea/32.png) [@hliu1020](https://community.wolfram.com/u/hliu1020)\
**Post date:** [September 20, 2017, 8:48am UTC](https://community.wolfram.com/t/set-zeromq-subscribe-channel-in-mathematica/11287/1 "2017-09-20T08:48:17Z")

</div>

Mathematica 11.2 can do ZMQ socket programming now! But I cannot find out how to set subscribe channel from searching the doc. When using c language there is a function [`zsocket_set_subscribe`](http://zguide.zeromq.org/c:espresso) to set the subscribe channel, it seems lacking corresponding function in [Mathematica Socket API](http://reference.wolfram.com/language/ref/SocketConnect.html) .

```
(* To create socket *)

client = SocketConnect[{"Pub IP", Pub Port}, "ZMQ_SUB"]

(* Then how to set channel to receive message? *)

```

* * *

I also asked in the [stackexchange](https://mathematica.stackexchange.com/questions/156161/how-to-set-zeromq-subscribe-channel-in-mathematica) and will sync if there is an answer.
