@@ -57,7 +57,7 @@ public ValueTask SubscribeAsync(NatsSubBase sub, CancellationToken cancellationT
5757 using var activity = Telemetry . StartSendActivity ( $ "{ _connection . SpanDestinationName ( sub . Subject ) } { Telemetry . Constants . SubscribeActivityName } ", _connection , sub . Subject , null , null ) ;
5858 try
5959 {
60- if ( props . Subject . IsInbox )
60+ if ( props . IsInboxSubject ( _connection . InboxPrefix ) )
6161 {
6262 if ( sub . QueueGroup != null )
6363 {
@@ -76,7 +76,7 @@ public ValueTask SubscribeAsync(NatsSubBase sub, CancellationToken cancellationT
7676 }
7777 }
7878
79- if ( props . Subject . IsInbox )
79+ if ( props . IsInboxSubject ( _connection . InboxPrefix ) )
8080 {
8181 if ( sub . QueueGroup != null )
8282 {
@@ -126,7 +126,7 @@ public ValueTask PublishToClientHandlersAsync(NatsProcessProps props, in ReadOnl
126126 {
127127 try
128128 {
129- return _connection . UnsubscribeAsync ( new NatsSubscriptionProps ( props . SubscriptionId , props . Subject . InboxPrefix ) ) ;
129+ return _connection . UnsubscribeAsync ( new NatsSubscriptionProps ( props . SubscriptionId ) ) ;
130130 }
131131 catch ( Exception e )
132132 {
@@ -181,7 +181,7 @@ public ValueTask RemoveAsync(NatsSubBase sub)
181181 _logger . LogDebug ( NatsLogEvents . Subscription , "Removing subscription {Subject}/{Sid}" , sub . Subject , subMetadata . Sid ) ;
182182 }
183183
184- return _connection . UnsubscribeAsync ( sub . SubscriptionProps ( _connection . InboxPrefix ) ) ;
184+ return _connection . UnsubscribeAsync ( sub . SubscriptionProps ) ;
185185 }
186186
187187 /// <summary>
@@ -216,7 +216,7 @@ internal async ValueTask WriteReconnectCommandsAsync(CommandWriter commandWriter
216216
217217 foreach ( var ( sub , sid ) in subs )
218218 {
219- await sub . WriteReconnectCommandsAsync ( commandWriter , new NatsSubscriptionProps ( sid , _connection . InboxPrefix ) ) . ConfigureAwait ( false ) ;
219+ await sub . WriteReconnectCommandsAsync ( commandWriter , new NatsSubscriptionProps ( sid ) ) . ConfigureAwait ( false ) ;
220220
221221 if ( _debug )
222222 {
@@ -227,7 +227,7 @@ internal async ValueTask WriteReconnectCommandsAsync(CommandWriter commandWriter
227227
228228 internal INatsSubscriptionManager GetManagerFor ( NatsSubscriptionProps props )
229229 {
230- if ( props . Subject . IsInbox )
230+ if ( props . IsInboxSubject ( _connection . InboxPrefix ) )
231231 return InboxSubBuilder ;
232232 return this ;
233233 }
@@ -352,7 +352,7 @@ private async ValueTask UnsubscribeSidsAsync(List<int> sids)
352352 try
353353 {
354354 _logger . LogWarning ( NatsLogEvents . Subscription , "Unsubscribing orphan subscription {Sid}" , sid ) ;
355- await _connection . UnsubscribeAsync ( new NatsSubscriptionProps ( sid , _connection . InboxPrefix ) ) . ConfigureAwait ( false ) ;
355+ await _connection . UnsubscribeAsync ( new NatsSubscriptionProps ( sid ) ) . ConfigureAwait ( false ) ;
356356 }
357357 catch ( Exception e )
358358 {
0 commit comments