You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-22Lines changed: 4 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,10 +110,9 @@ Here's an example that will get you started quickly. It listens to a single acco
110
110
constclient=newPubSubApiClient();
111
111
awaitclient.connect();
112
112
113
-
// Subscribe to a single incoming account change event
113
+
// Subscribe to account change events
114
114
consteventEmitter=awaitclient.subscribe(
115
-
'/data/AccountChangeEvent',
116
-
1
115
+
'/data/AccountChangeEvent'
117
116
);
118
117
119
118
// Handle incoming events
@@ -127,15 +126,6 @@ Here's an example that will get you started quickly. It listens to a single acco
127
126
);
128
127
console.log(JSON.stringify(event, null, 2));
129
128
});
130
-
131
-
// Handle last requested event
132
-
eventEmitter.on('lastevent', () => {
133
-
console.log(
134
-
`Reached last requested event on channel ${eventEmitter.getTopicName()}.`
135
-
);
136
-
// At this point the gRPC client will close automatically
137
-
// unless you re-subscribe to request more events (default Pub/Sub API behavior)
138
-
});
139
129
} catch (error) {
140
130
console.error(error);
141
131
}
@@ -152,7 +142,7 @@ Here's an example that will get you started quickly. It listens to a single acco
152
142
Connected to Salesforce org https://pozil-dev-ed.my.salesforce.com as grpc@pozil.com
153
143
Connected to Pub/Sub API endpoint api.pubsub.salesforce.com:7443
154
144
Topic schema loaded: /data/AccountChangeEvent
155
-
Subscribe request sent for 1 events from /data/AccountChangeEvent...
145
+
Subscribe request sent for 100 events from /data/AccountChangeEvent...
156
146
```
157
147
158
148
At this point the script will be on hold and will wait for events.
@@ -163,7 +153,7 @@ Here's an example that will get you started quickly. It listens to a single acco
163
153
164
154
```
165
155
Received 1 events, latest replay ID: 18098167
166
-
Handling Account change event with ID 18098167 on channel /data/AccountChangeEvent (1/1 events received so far)
156
+
Handling Account change event with ID 18098167 on channel /data/AccountChangeEvent (1/100 events received so far)
167
157
{
168
158
"replayId": 18098167,
169
159
"payload": {
@@ -241,14 +231,6 @@ Here's an example that will get you started quickly. It listens to a single acco
241
231
242
232
Use the values from `ChangeEventHeader.nulledFields`, `ChangeEventHeader.diffFields` and `ChangeEventHeader.changedFields` to identify actual value changes.
243
233
244
-
After receiving the number of requested events, the script will terminate with these messages:
245
-
246
-
```
247
-
Reached last requested event on channel /data/AccountChangeEvent
0 commit comments