Integration Questions For Salesforce Interview
For Salesforce apps, integration is very important. One of the most important collaboration ideas is the Streaming API. This post answers the most-asked question about Streaming API.
What is the Streaming API?
Streaming APIs are implemented to tell clients about new information, data, changes to data, etc. Messages are sent to the client from Salesforce based on the factors we set.
Let’s say you want to tell your user to switch to another server when the server is down. We can send messages to users using the streaming API.
How do I make a Streaming API?
There are many ways to build a live API. Here are some of the most important ways to build streaming API.
- The long poll is a way for HTTP hosts to keep a link open for a client until data becomes available on the server. If data is available right away, the link is not kept open.
- Comet over HTTP: Comet is a web application model in which a web server can push data to a browser without the browser asking for it. This is done by making a long-running HTTPS request. The Bayeux protocol is used to make the CometD system.
- XMPP is made for publishing and subscribing on the web, but it is not built on HTTP. XMPP (Extensible Messaging and Presence Protocol) has a lot of features beyond what is needed to build a live API.
- HTML 5 Event Source: The interface for server-sent events on the web is called EventSource. An EventSource instance starts a continuous link to an HTTP server that sends events in text/event-stream style. The link will stay open until you call EventSource.close(). Server-sent events don’t go back and forth.
What is push technology?
Push technology is a way to send and receive information over the Internet. The transaction request is made by the central web server or provider. Pull technology is the reverse of push technology. In pull technology, the clients or users ask for the information to be sent.
What is the Bayeux Protocol?
- Bayeux is a system for sending data that can be sent at different times, mostly over HTTP.
What does “Message Reliability” mean?
Message dependability guarantees the arrival and order of messages from the client to the service, no matter how many middlemen are involved or how many network hops it takes to get the message from the client to the service. Reliability is guaranteed by adhering to a standard for transport-level session maintenance in message-based communication.
What does “Message Durability” mean?
Durability keeps words around so that anyone who wants to hear them can.
What’s the difference between Streaming API and REST API?
REST API is a web service that works in a structure of “request” and “response.” The user will ask the REST API for information one at a time and get the right information in a single answer. After the answer is sent back to the user, the connection is closed until the user makes another call to the API. REST APIs are great for people who want to get a “snapshot” of data that doesn’t change very often.
Streaming APIs keep an open link with the customer and give them new information until the connection is closed. Streaming APIs are great for when a user needs to get a steady stream of live info that changes quickly. The server sends back replies with new information over and over until the user closes the link.
What’s the difference between an outbound message and a Streaming API?
Outbound Message :
- Most outbound sending is done by the server.
- If the computer went down for some reason and we brought it back up, it would need to wait for messages to be sent from Salesforce, which could take a long time.
- Only one receiver can receive it.
- It uses XML and is tightly typed.
- Outbound Message has a built-in way to try again. If the address isn’t working, messages remain in the queue until they are sent successfully or until they are twenty-four hours old, whichever comes first.
- It might not be in the right order.
Streaming API :
- Streaming API is run by the client.
- If a client is down and we bring it back up, we can quickly play back the message that was sent before. Bringing the external source up-to-date much more quickly and getting the information in the right order.
- Each subject only has a certain number of members.
- It is written in a loose way and uses JSON.
- Salesforce keeps PushTopic events, general events, and events with a normal volume of activity for 24 hours. Events with a high volume of activity are kept for 72 hours. EventBus can be used.If something fails, use RetryableException to try again.
- Streaming APIs are sure to give what was asked for.
What kinds of Streaming API are there?
Generic events that can be used to send unique alerts that aren’t tied to changes in Salesforce data. Like Send alerts to a group of people, a team, or your whole organisation.
PushTopic events are a safe and scalable way to find out when Salesforce data changes that match a SOQL query you create. For example, capture changes to the fields and records that meet a SOQL query, like “capture closed cases.”
Receive changes to Salesforce records in almost real time and sync them with records in an external data store. Like, when some data in the salesforce system changes, we want the external system to be updated.
Platform events are messages that hold data that are safe and flexible. Event texts are sent out by publishers, and users get them in real time. Through the sharing of real-time event data, platform events can be used to connect business processes in Salesforce to apps outside of Salesforce.
What’s the difference between Push Topic and Change Data Capture?
For data change events, both Change data capture and Push topic are used. Here are some differences between the two events:
Change Data Capture :
- We can sign up through peak triggers.
- We can’t use filter orders to only get closed cases, for example.
- We can’t choose which fields to include in Salesforce record change event emails.
- With Shield Platform Encryption, we can hide field data.
- We have 3 days to keep track of the event.
- The event model can be made in different ways.
Push Topic :
- We can’t use the apex cue to register.
- It lets you subscribe to filters
- We can use fields to add information to an event notice. We can’t use Shield Platform Encryption to secure field data, though.
- We can only hold on to one day.
- We can’t make a model version
You might also be interested in
- How to Utilize Salesforce Labs for Maximum Efficiency
- The Essential Guide to Salesforce Solution Architect Responsibilities
- salesforce interview questions and answers – Basic
- Salesforce Developer Interview Questions and Answers
- Restriction Rules in Salesforce with Example
- The Best Trailhead Badges in 2023
- What does Salesforce data skew mean?
- Highlights of TrailblazerDX ‘23
- How long will Salesforce be in the market?
- Lightning Web Components Explained