Is it possible to subscribe one topic in servicebus to another topic in same service bus.If possible how to achieve this functionality during runtime(through code). Thank you.
As I have said, the Service Bus autoforwarding
feature enables you to chain a queue or subscription to another queue or topic that is part of the same namespace.
When autoforwarding
is enabled, Service Bus automatically removes messages that are placed in the first queue or subscription (source) and puts them in the second queue or topic (destination). It is still possible to send a message to the destination entity directly. Also, it is not possible to chain a subqueue, such as a deadletter queue, to another queue or topic.
You can enable autoforwarding by setting the SubscriptionDescription.ForwardTo properties on the SubscriptionDescription objects for the source, as in the following example:
SubscriptionDescription srcSubscription = new SubscriptionDescription (srcTopic, srcSubscriptionName);
srcSubscription.ForwardTo = destTopic;
namespaceManager.CreateSubscription(srcSubscription));
For more details, you could refer to this article.