# How to make shared subscribe?

**URL:** <https://forum.cedalo.com/t/how-to-make-shared-subscribe/687>\
**Category:** MQTT protocol\
**Created:** [December 13, 2022, 2:21am UTC](https://forum.cedalo.com/t/how-to-make-shared-subscribe/687 "2022-12-13T02:21:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ackema](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ackema](https://forum.cedalo.com/u/ackema)\
**Post date:** [December 13, 2022, 2:21am UTC](https://forum.cedalo.com/t/how-to-make-shared-subscribe/687/1 "2022-12-13T02:21:39Z")

</div>

Hello,

I want to use shared subscribe and I have tried these:

```auto
# subscriber client 1
mosquitto_sub -d -t $share/mytopic
or
mosquitto_sub -V 5 -d -t $share/mytopic

# subscriber client 2
mosquitto_sub -d -t $share/mytopic
or
mosquitto_sub -V 5 -d -t $share/mytopic

# publisher client
mosquitto_pub -t /mytopic -m "hello"
or
mosquitto_pub -V 5 -t /mytopic -m "hello"

```

However, it doesn’t work.

---

<div class="post-metadata">

**Author:** ![Tizian](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.cedalo.com/tizian/32/33_2.png) [@Tizian](https://forum.cedalo.com/u/Tizian)\
**Post date:** [December 13, 2022, 4:15pm UTC](https://forum.cedalo.com/t/how-to-make-shared-subscribe/687/2 "2022-12-13T16:15:01Z")

</div>

Hi ackema,

I see three possible reasons for your problem:

1. in your example you are not using a group Id as part of the topic tree.
2. In the publish you are using “/mytopic” instead of mytopic
3. Linux sometimes swallows $ sings if you are not putting it into single quotes

does any of the above fix your problem? 🙂

---

<div class="post-metadata">

**Author:** ![ackema](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ackema](https://forum.cedalo.com/u/ackema)\
**Post date:** [December 16, 2022, 6:04am UTC](https://forum.cedalo.com/t/how-to-make-shared-subscribe/687/3 "2022-12-16T06:04:03Z")

</div>

Thanks a lot!

Problem solved
