# Not receiving published message in different actor system

**URL:** <https://discuss.akka.io/t/not-receiving-published-message-in-different-actor-system/5594>\
**Category:** Akka Cluster\
**Tags:** akka\
**Created:** [December 12, 2019, 6:11am UTC](https://discuss.akka.io/t/not-receiving-published-message-in-different-actor-system/5594 "2019-12-12T06:11:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anilkumble](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@anilkumble](https://discuss.akka.io/u/anilkumble)\
**Post date:** [December 12, 2019, 6:11am UTC](https://discuss.akka.io/t/not-receiving-published-message-in-different-actor-system/5594/1 "2019-12-12T06:11:00Z")

</div>

Hi

I want to communicate actors across the cluster, So I am planning to use pub sub protocal in akka.  
And I found sample java code from the below link  
[https://doc.akka.io/docs/akka/current/distributed-pub-sub.html#tab1](https://doc.akka.io/docs/akka/current/distributed-pub-sub.html#tab1)

If I use same actor system for both publish and subscribe then I can see the published messages.  
If it is different actor system then I am unable to see.

I am getting the below error

> [INFO] [12/12/2019 19:08:12.785] [ReactorCluster-akka.actor.default-dispatcher-15] [akka://ReactorCluster/system/distributedPubSubMediator] Message [java.lang.String] from Actor[akka://ReactorCluster/user/publisher#298442915] to Actor[akka://ReactorCluster/system/distributedPubSubMediator#549143944] was not delivered. [4] dead letters encountered. If this is not an expected behavior, then [Actor[akka://ReactorCluster/system/distributedPubSubMediator#549143944]] may have terminated unexpectedly, This logging can be turned off or adjusted with configuration settings ‘akka.log-dead-letters’ and ‘akka.log-dead-letters-during-shutdown’.

Can’t we use different actor system for publish and subscribe ?

And what is the difference between Classic Distributed Publish Subscribe and normal Distributed Publish Subscribe

Please advice me

---

<div class="post-metadata">

**Author:** ![anilkumble](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@anilkumble](https://discuss.akka.io/u/anilkumble)\
**Post date:** [December 17, 2019, 9:52am UTC](https://discuss.akka.io/t/not-receiving-published-message-in-different-actor-system/5594/2 "2019-12-17T09:52:24Z")

</div>

Could someone clarify me the above question ?

---

<div class="post-metadata">

**Author:** ![johanandren](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/johanandren/32/85_2.png) [@johanandren](https://discuss.akka.io/u/johanandren)\
**Post date:** [January 2, 2020, 4:02pm UTC](https://discuss.akka.io/t/not-receiving-published-message-in-different-actor-system/5594/3 "2020-01-02T16:02:40Z")

</div>

A few things to check:

- Verify that the mediator is started on each node (debug logs should help)
- Verify that you use the same config for the mediator on each node
- Gossip of subscribers for a topic takes a little time, if you publish before a node knows there is a subscriber on the other node it will not be sent there
