Just a second...

Topic replication

You can use topic replication to ensure that the structure of the topic tree, topic definitions, and topic data are synchronized between servers.

Note: DO NOT use topic replication in production with Diffusion™ version 5.9. It does not always scale adequately for production use. If you want to use topic replication in production, we advise that you upgrade to Diffusion 6.0 or above which has a completely re-engineered scalable implementation.
Figure 1. Topic replication Servers that have topic replication enabled for a section of the topic tree have identical topic information for that section of the topic tree. A new topic is created on one server. Topic replication ensures that an identical topic is created on the other servers.
  1. Servers with topic replication enabled for a section of the topic tree share information about that section of the topic tree through the datagrid. The topic information and topic data are synchronized on all the servers.
  2. A new topic is created on one server in the replicated section of the topic tree.
  3. The new topic is replicated on the other servers with identical topic information. When its topic data is updated on the first server, that data is replicated on the other servers.

Considerations

Consider the following factors when using topic replication:
  • Replicated topic must be updated by the exclusive update mechanism. Any updating client must register as an update source for the topic.
  • Avoid registering a large number of update sources. Do not design your solution so that each topic has its own exclusive update source. This will cause performance problems when starting new servers and joining them to existing clusters, due to the overhead of sharing the update source registrations.
  • Only publishing topics can be replicated.
  • Replication is supported only for the following types of topic:
    • JSON
    • Binary
    • Single value
    • Record
    • Custom

      The custom class for that topic must be available on the classpath of all Diffusion servers replicating that topic.

    • Protocol buffer

      The compiled .proto file that defines the format of the data on a protocol buffer topic must be available on the classpath of all Diffusion servers replicating that topic.

    • Stateless
    • Slave

      A replicated slave topic is linked to a master topic located on the same Diffusion server as the replicated slave topic. This is true whether that master topic is created by replication or directly. If the master topic does not exist on the Diffusion server that a slave topic is replicated to, the slave topic is not created. Instead it is added to a pending set of topics. If the master topic is subsequently created by replication or directly, the slave topic is removed from the pending set and is created on the Diffusion server.

  • Replication is not supported for paged topics.
  • Any topic that is part of a replicated branch of the topic tree and is not one of the supported types of topic is not replicated. Instead that topic path remains unbound.
  • Only topic-wide messages are replicated. Messages sent to a single client or to all clients except one are not replicated.
  • Replication of topic information into the datagrid is not automatic. It must be configured at the server. This gives a performance advantage, as you can choose which parts of your topic tree to replicate.
  • Replication of topic data can impact performance.
  • Do not use topic replication on sections of the topic tree that are owned and updated by publishers. Publishers can make updates to topics that are not replicated or that supersede replicated data. If you use topic replication with topics updated by publishers, this can cause the data on the replicated topics to become unsynchronized.
  • Avoid registering requests for topic removal on client session close against replicated topics. When a replicated topic is removed from a server as a result of a client session closing, it is removed from all other servers that replicate that topic. For more information, see Removing topics with sessions.