• Bhagyashree Jog
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 1
    Replies
Hello,
I am using cometd to connect to Salesforce Streaming API to subscribe to platform events channel. I have lot of messages on my event channel, but my client is not equipped to take in all the messages at once. Is there a provision in Salesforce streaming where I can get only 100 messages at a time in one /meta/connect request. I have read that Salesforce supports message batching in Streaming. How do I use batching to get messages in batches of say 100 at a time on my streaming client.
Hello,

I have followed these steps to enforce Mutual Auth in my account :
  • Upload Mutual Auth certificate in Certificate and Key Management
  • Enforce SSL/TLS Mutual Auth in General User Permissions for my user profile
  • Then I did a login call through my client giving the key file which will be used for mutual auth. This works fine and i get a response
  • But the weird thing is that my login call returns a valid response even if I dont provide the client key required for mutual auth
  • Is mutual auth optional for login. Why is it not giving an error when I make a login call without client key
  • Also does mutual auth for all other APIs require CA signed certs or self signed certs are allowed by Salesforce
I am using Salesforce Composite Sobject Tree API. I want to know if there is any API which I can use to obtain the Sobject tree response schema specified here : https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/responses_composite_sobject_tree.htm
I need the response schema in json or xml format. Something like this
 
<complexType name="SObjectTreeResponse">
        <sequence>
            <element name="hasErrors" type="boolean" minOccurs="1"/>
            <element name="results" type="cns:results" nillable="true" minOccurs="1" maxOccurs="unbounded"/>
        </sequence>
</complexType>

 
We are subscribing to Push Topics and Platform Events using CometD Subscriber using the code in the EMP Connector provided on GitHub.

Scenario:
Take the case of a subscriber listening on channel /topic/channel. The replayId is -1
Lets say the subscriber received messages upto replayId 20 and then due to some reason the subscriber went down and then came up and started listening on the channel again
In the time the subscriber was down four new events were published. But when the subscriber comes up it will start receiving messages from 25 since the replay id is -1

Question : Is there any way to ensure that the subscriber starts listening from id 21 when it comes up. 
I know that one way is to give the replay id as 21. But that is not suitable for our application
Is there a way to query salesforce through cometD or any SOAP/REST API to check the last received event's replayID and then start the subscriber from that. 
Can we use EventBusSubcriber for this? I started our application and subscribed to a platform event through cometd and tried querying the entries in EventBusSubcriber. But it did not have any entries
I read about filtered subscription in this post : https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/using_filtered_subscriptions.htm
I want to know what is the way to implement filtered subscriptions in the java client which uses Bayeux and Cometd lib
I am relying on the AsyncApi.xsd obtained through https://instance.salesforce.com/services/async/version/AsyncApi.xsd to get the format of JobInfo, BatchInfo to construct the request for Bulk APIs. My concern is the xsd does not mention which elements are required to be put in the request and which are not. Is there any other way to identify this which elements from JobInfo, BatchInfo are to be used request and which are not to be mentioned in the request to the APIs. My main objective is to use the xsd to construct request generically without having to change it for every API version. Also another question is how frequently do the schemas JobInfo and BatchInfo etc change with a change in API version?
Hello,
I am using cometd to connect to Salesforce Streaming API to subscribe to platform events channel. I have lot of messages on my event channel, but my client is not equipped to take in all the messages at once. Is there a provision in Salesforce streaming where I can get only 100 messages at a time in one /meta/connect request. I have read that Salesforce supports message batching in Streaming. How do I use batching to get messages in batches of say 100 at a time on my streaming client.