Share via


Example: Creating a Topic

 

The following example shows how to create a topic.

PUT /MyTopics/Topic1 HTTP/1.1
Host: Contoso.servicebus.Windows.net
Content-Type: application/atom+xml
Accept: application/atom+xml
Authorization: …
Content-Length: nnn


<entry xmlns='http://www.w3.org/2005/Atom'>  
<content type='application/xml'>    
<TopicDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
   <DefaultMessageTimeToLive>P10675199DT2H48M5.4775807S</DefaultMessageTimeToLive>
   <MaxSizeInMegaBytes>1024</MaxSizeInMegaBytes>
   <RequiresDuplicateDetection>false</RequiresDuplicateDetection>
   <DuplicateDetectionHistoryTimeWindow>P7D</DuplicateDetectionHistoryTimeWindow>
<DeadLetteringOnFilterEvaluationExceptions>true</DeadLetteringOnFilterEvaluationExceptions>
</TopicDescription>  
</content>
</entry>

See Also

Topics
Topic Description
Create Topic
Delete Topic
Get Topic
List Topics