@Override
        public void unregister(Subscriber subscriber) {
            synchronized (mutex) {
                try {
                    List<Subscriber> list = new ArrayList<>(topicSubscribers.get(subscriber.getTopic()));
                    list.remove(subscriber);
                    topicSubscribers.put(subscriber.getTopic(), list);
                } catch (Exception ignored) {
                }
            }
        }
Subscriber interface to be implemented to subscribe to in-memory broker.
modules/siddhi-core/src/main/java/io/siddhi/core/util/transport/InMemoryBroker.java