@@ -45,7 +45,7 @@ import {
45
45
} from "./types" ;
46
46
import { FumaroleSM } from "./runtime/state-machine" ;
47
47
import { downloadSlotObserverFactory , GrpcSlotDownloader } from "./runtime/grpc-slot-downloader" ;
48
- import { DownloadTaskArgs , DownloadTaskResult , fumaroleObservable , FumaroleRuntimeArgs , RuntimeEvent } from "./runtime/runtime " ;
48
+ import { DownloadTaskArgs , DownloadTaskResult , fumaroleObservable , FumaroleRuntimeArgs , RuntimeEvent } from "./runtime/reactive_runtime " ;
49
49
import { firstValueFrom , from , Observable , Observer , share , Subject } from "rxjs" ;
50
50
import { createDeferred } from "./utils/promise" ;
51
51
import { makeObservable } from "./utils/grpc_ext" ;
@@ -140,24 +140,39 @@ export class FumaroleClient {
140
140
} ) ;
141
141
}
142
142
143
+ /**
144
+ * Establish a Dragonsouth-like consumption stream from a persistent subscriber.
145
+ *
146
+ * @param persistentSubscriberName The name of the persistent subscriber to connect to.
147
+ * @param request the initial `SubscribeRequest` to use.
148
+ * @returns an observable that emits updates from the subscriber.
149
+ */
143
150
async dragonsmouthSubscribe (
144
- consumerGroupName : string ,
151
+ persistentSubscriberName : string ,
145
152
request : SubscribeRequest ,
146
153
) : Promise < Observable < SubscribeUpdate > > {
147
154
return this . dragonsmouthSubscribeWithConfig (
148
- consumerGroupName ,
155
+ persistentSubscriberName ,
149
156
request ,
150
157
getDefaultFumaroleSubscribeConfig ( ) ,
151
158
) ;
152
159
}
153
160
161
+ /**
162
+ * Establish a Dragonsouth-like consumption stream from a persistent subscriber.
163
+ *
164
+ * @param persistentSubscriberName The name of the persistent subscriber to connect to.
165
+ * @param initialSubscribeRequest The initial `SubscribeRequest` to use.
166
+ * @param config An instance of `FumaroleSubscribeConfig` configuration options for the subscription.
167
+ * @returns an observable that emits updates from the subscriber.
168
+ */
154
169
public async dragonsmouthSubscribeWithConfig (
155
- consumerGroupName : string ,
170
+ persistentSubscriberName : string ,
156
171
initialSubscribeRequest : SubscribeRequest ,
157
172
config : FumaroleSubscribeConfig ,
158
173
) : Promise < Observable < SubscribeUpdate > > {
159
-
160
- const initialJoin : JoinControlPlane = { consumerGroupName } ;
174
+
175
+ const initialJoin : JoinControlPlane = { consumerGroupName : persistentSubscriberName } ;
161
176
const initialJoinCommand : ControlCommand = { initialJoin } ;
162
177
const controlPlaneCommandSubject = new Subject < ControlCommand > ( ) ;
163
178
const fumaroleRuntimeEventSubject = new Subject < RuntimeEvent > ( ) ;
0 commit comments