Accessing /systemTopic/ streaming channelWhat are the available /systemTopic/ channels in the Streaming API?accessing the Streaming API from a public-facing Force.com SiteSalesforce streaming API v 29.0 and Delete ActionAccessing editdate for a field through ApiGetting exception in api calling of Channel Order app of SalesforceRestrict API User from accessing User objectstreaming api functionality to keep the application on the non-salesforce server up to date quickerStreaming API Subscription methodsAuthentication from Salesforce Streaming APIstreaming api disconnectingHow to programmatically check if the Streaming API is enabled?
Is adding a new player (or players) a DM decision, or a group decision?
Is there any set of 2-6 notes that doesn't have a chord name?
EM algorithm and Mean residual life
Why is a blank required between "[[" and "-e xxx" in ksh?
A player is constantly pestering me about rules, what do I do as a DM?
How was film developed in the late 1920s?
Alphabet completion rate
Correct spacing in the alignat*-environment
Wilcoxon signed rank test – critical value for n>50
What happens when your group is victim of a surprise attack but you can't be surprised?
Mount a folder with a space on Linux
How hard is it to sell a home which is currently mortgaged?
Children's short story about material that accelerates away from gravity
How well known and how commonly used was Huffman coding in 1979?
Can you get infinite turns with this 2 card combo?
Signing using digital signatures?
How to positively portray high and mighty characters?
Is this the golf ball that Alan Shepard hit on the Moon?
C-152 carb heat on before landing in hot weather?
Intuitively, why does putting capacitors in series decrease the equivalent capacitance?
Why isn’t the tax system continuous rather than bracketed?
Is there a short way to check uniqueness of values without using 'if' and multiple 'and's?
Bash echo $-1 prints hb1. Why?
Averting Real Women Don’t Wear Dresses
Accessing /systemTopic/ streaming channel
What are the available /systemTopic/ channels in the Streaming API?accessing the Streaming API from a public-facing Force.com SiteSalesforce streaming API v 29.0 and Delete ActionAccessing editdate for a field through ApiGetting exception in api calling of Channel Order app of SalesforceRestrict API User from accessing User objectstreaming api functionality to keep the application on the non-salesforce server up to date quickerStreaming API Subscription methodsAuthentication from Salesforce Streaming APIstreaming api disconnectingHow to programmatically check if the Streaming API is enabled?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm using the Salesforce generic streaming demo to try to listen to systemTopic channels, but not able to get it to work. Tried accessing /systemTopic/TestResult and /systemTopic/Logging but could not see either.
Here's the demo code: https://github.com/snugsfbay/SalesforceDurableStreamingDemo
Controller:
public String channelget; private set;
public Id channelIdget; private set;
public Integer replayFromget;set;
public DurableGenericStreamingController()
this.channel = '/systemTopic/TestResult';
this.replayFrom = -2;
this.channelId = getStreamingChannelId(this.channel).Id;
private StreamingChannel getStreamingChannelId(String channel)
return [SELECT Id FROM StreamingChannel WHERE Name=:channel];
and script from the VF:
<script>
var $j = jQuery.noConflict();
function generateEvents(msgInputId, numMsgInputId, channelId, sessionId)
var pushEventsPayload = ;
var pushEvents = [];
for (var i=0; i < parseInt(document.getElementById(numMsgInputId).value); i++)
var event = ;
event.payload = document.getElementById(msgInputId).value;
event.userIds = [];
pushEvents.push(event);
pushEventsPayload.pushEvents = pushEvents;
$j.ajax(
url: window.location.protocol+'//'+window.location.hostname+ (null != window.location.port ? (':'+window.location.port) : '') +
'/services/data/v36.0/sobjects/StreamingChannel/'+ channelId + '/push',
headers:
'Authorization': 'OAuth ' + sessionId
,
type: "POST",
data: JSON.stringify(pushEventsPayload),
contentType: "application/json; charset=utf-8",
dataType: "json"
);
</script>
API version is 36 for both the endpoint and the controller because I was testing with Logging endpoint as well.
Fails when it tries to find the ID for these channels. Any suggestions? Do you think the Lightning component for emp api would work?
api streaming testresult channel
add a comment |
I'm using the Salesforce generic streaming demo to try to listen to systemTopic channels, but not able to get it to work. Tried accessing /systemTopic/TestResult and /systemTopic/Logging but could not see either.
Here's the demo code: https://github.com/snugsfbay/SalesforceDurableStreamingDemo
Controller:
public String channelget; private set;
public Id channelIdget; private set;
public Integer replayFromget;set;
public DurableGenericStreamingController()
this.channel = '/systemTopic/TestResult';
this.replayFrom = -2;
this.channelId = getStreamingChannelId(this.channel).Id;
private StreamingChannel getStreamingChannelId(String channel)
return [SELECT Id FROM StreamingChannel WHERE Name=:channel];
and script from the VF:
<script>
var $j = jQuery.noConflict();
function generateEvents(msgInputId, numMsgInputId, channelId, sessionId)
var pushEventsPayload = ;
var pushEvents = [];
for (var i=0; i < parseInt(document.getElementById(numMsgInputId).value); i++)
var event = ;
event.payload = document.getElementById(msgInputId).value;
event.userIds = [];
pushEvents.push(event);
pushEventsPayload.pushEvents = pushEvents;
$j.ajax(
url: window.location.protocol+'//'+window.location.hostname+ (null != window.location.port ? (':'+window.location.port) : '') +
'/services/data/v36.0/sobjects/StreamingChannel/'+ channelId + '/push',
headers:
'Authorization': 'OAuth ' + sessionId
,
type: "POST",
data: JSON.stringify(pushEventsPayload),
contentType: "application/json; charset=utf-8",
dataType: "json"
);
</script>
API version is 36 for both the endpoint and the controller because I was testing with Logging endpoint as well.
Fails when it tries to find the ID for these channels. Any suggestions? Do you think the Lightning component for emp api would work?
api streaming testresult channel
add a comment |
I'm using the Salesforce generic streaming demo to try to listen to systemTopic channels, but not able to get it to work. Tried accessing /systemTopic/TestResult and /systemTopic/Logging but could not see either.
Here's the demo code: https://github.com/snugsfbay/SalesforceDurableStreamingDemo
Controller:
public String channelget; private set;
public Id channelIdget; private set;
public Integer replayFromget;set;
public DurableGenericStreamingController()
this.channel = '/systemTopic/TestResult';
this.replayFrom = -2;
this.channelId = getStreamingChannelId(this.channel).Id;
private StreamingChannel getStreamingChannelId(String channel)
return [SELECT Id FROM StreamingChannel WHERE Name=:channel];
and script from the VF:
<script>
var $j = jQuery.noConflict();
function generateEvents(msgInputId, numMsgInputId, channelId, sessionId)
var pushEventsPayload = ;
var pushEvents = [];
for (var i=0; i < parseInt(document.getElementById(numMsgInputId).value); i++)
var event = ;
event.payload = document.getElementById(msgInputId).value;
event.userIds = [];
pushEvents.push(event);
pushEventsPayload.pushEvents = pushEvents;
$j.ajax(
url: window.location.protocol+'//'+window.location.hostname+ (null != window.location.port ? (':'+window.location.port) : '') +
'/services/data/v36.0/sobjects/StreamingChannel/'+ channelId + '/push',
headers:
'Authorization': 'OAuth ' + sessionId
,
type: "POST",
data: JSON.stringify(pushEventsPayload),
contentType: "application/json; charset=utf-8",
dataType: "json"
);
</script>
API version is 36 for both the endpoint and the controller because I was testing with Logging endpoint as well.
Fails when it tries to find the ID for these channels. Any suggestions? Do you think the Lightning component for emp api would work?
api streaming testresult channel
I'm using the Salesforce generic streaming demo to try to listen to systemTopic channels, but not able to get it to work. Tried accessing /systemTopic/TestResult and /systemTopic/Logging but could not see either.
Here's the demo code: https://github.com/snugsfbay/SalesforceDurableStreamingDemo
Controller:
public String channelget; private set;
public Id channelIdget; private set;
public Integer replayFromget;set;
public DurableGenericStreamingController()
this.channel = '/systemTopic/TestResult';
this.replayFrom = -2;
this.channelId = getStreamingChannelId(this.channel).Id;
private StreamingChannel getStreamingChannelId(String channel)
return [SELECT Id FROM StreamingChannel WHERE Name=:channel];
and script from the VF:
<script>
var $j = jQuery.noConflict();
function generateEvents(msgInputId, numMsgInputId, channelId, sessionId)
var pushEventsPayload = ;
var pushEvents = [];
for (var i=0; i < parseInt(document.getElementById(numMsgInputId).value); i++)
var event = ;
event.payload = document.getElementById(msgInputId).value;
event.userIds = [];
pushEvents.push(event);
pushEventsPayload.pushEvents = pushEvents;
$j.ajax(
url: window.location.protocol+'//'+window.location.hostname+ (null != window.location.port ? (':'+window.location.port) : '') +
'/services/data/v36.0/sobjects/StreamingChannel/'+ channelId + '/push',
headers:
'Authorization': 'OAuth ' + sessionId
,
type: "POST",
data: JSON.stringify(pushEventsPayload),
contentType: "application/json; charset=utf-8",
dataType: "json"
);
</script>
API version is 36 for both the endpoint and the controller because I was testing with Logging endpoint as well.
Fails when it tries to find the ID for these channels. Any suggestions? Do you think the Lightning component for emp api would work?
api streaming testresult channel
api streaming testresult channel
asked Jun 9 at 14:29
snugsfbaysnugsfbay
6165 silver badges16 bronze badges
6165 silver badges16 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I haven't tested it, but I believe the problem is with the endpoint.
The code you have makes sense for a standard streaming channel that you have configured. However, this is a built in System Channel.
It won't show up in with a SOQL query against StreamingChannel.
Instead, you should try and match how the Developer Console calls it.
I see a POST call to /cometd/36.0 with a request payload like:
["channel":"/meta/subscribe","subscription":"/systemTopic/TestResult","id":"4","clientId":"jdhohbx123456789012345mjkmh"]
I use /systemTopic/TestResult from a .NET application with cometD against that channel and it works well.
The example in Replay Events Sample: Code Walkthrough should be easier to adapt as it uses the channel directly rather than the StreamingChannel.
1
Thanks, I just needed to get my eyeballs pointed in the right direction. I should have been looking at the component on the VF page because that's where all the cool stuff happens, including the reference to /cometd/36.0.
– snugsfbay
Jun 9 at 22:24
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "459"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f265257%2faccessing-systemtopic-streaming-channel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I haven't tested it, but I believe the problem is with the endpoint.
The code you have makes sense for a standard streaming channel that you have configured. However, this is a built in System Channel.
It won't show up in with a SOQL query against StreamingChannel.
Instead, you should try and match how the Developer Console calls it.
I see a POST call to /cometd/36.0 with a request payload like:
["channel":"/meta/subscribe","subscription":"/systemTopic/TestResult","id":"4","clientId":"jdhohbx123456789012345mjkmh"]
I use /systemTopic/TestResult from a .NET application with cometD against that channel and it works well.
The example in Replay Events Sample: Code Walkthrough should be easier to adapt as it uses the channel directly rather than the StreamingChannel.
1
Thanks, I just needed to get my eyeballs pointed in the right direction. I should have been looking at the component on the VF page because that's where all the cool stuff happens, including the reference to /cometd/36.0.
– snugsfbay
Jun 9 at 22:24
add a comment |
I haven't tested it, but I believe the problem is with the endpoint.
The code you have makes sense for a standard streaming channel that you have configured. However, this is a built in System Channel.
It won't show up in with a SOQL query against StreamingChannel.
Instead, you should try and match how the Developer Console calls it.
I see a POST call to /cometd/36.0 with a request payload like:
["channel":"/meta/subscribe","subscription":"/systemTopic/TestResult","id":"4","clientId":"jdhohbx123456789012345mjkmh"]
I use /systemTopic/TestResult from a .NET application with cometD against that channel and it works well.
The example in Replay Events Sample: Code Walkthrough should be easier to adapt as it uses the channel directly rather than the StreamingChannel.
1
Thanks, I just needed to get my eyeballs pointed in the right direction. I should have been looking at the component on the VF page because that's where all the cool stuff happens, including the reference to /cometd/36.0.
– snugsfbay
Jun 9 at 22:24
add a comment |
I haven't tested it, but I believe the problem is with the endpoint.
The code you have makes sense for a standard streaming channel that you have configured. However, this is a built in System Channel.
It won't show up in with a SOQL query against StreamingChannel.
Instead, you should try and match how the Developer Console calls it.
I see a POST call to /cometd/36.0 with a request payload like:
["channel":"/meta/subscribe","subscription":"/systemTopic/TestResult","id":"4","clientId":"jdhohbx123456789012345mjkmh"]
I use /systemTopic/TestResult from a .NET application with cometD against that channel and it works well.
The example in Replay Events Sample: Code Walkthrough should be easier to adapt as it uses the channel directly rather than the StreamingChannel.
I haven't tested it, but I believe the problem is with the endpoint.
The code you have makes sense for a standard streaming channel that you have configured. However, this is a built in System Channel.
It won't show up in with a SOQL query against StreamingChannel.
Instead, you should try and match how the Developer Console calls it.
I see a POST call to /cometd/36.0 with a request payload like:
["channel":"/meta/subscribe","subscription":"/systemTopic/TestResult","id":"4","clientId":"jdhohbx123456789012345mjkmh"]
I use /systemTopic/TestResult from a .NET application with cometD against that channel and it works well.
The example in Replay Events Sample: Code Walkthrough should be easier to adapt as it uses the channel directly rather than the StreamingChannel.
edited Jun 9 at 22:08
answered Jun 9 at 22:01
Daniel BallingerDaniel Ballinger
76.1k16 gold badges162 silver badges424 bronze badges
76.1k16 gold badges162 silver badges424 bronze badges
1
Thanks, I just needed to get my eyeballs pointed in the right direction. I should have been looking at the component on the VF page because that's where all the cool stuff happens, including the reference to /cometd/36.0.
– snugsfbay
Jun 9 at 22:24
add a comment |
1
Thanks, I just needed to get my eyeballs pointed in the right direction. I should have been looking at the component on the VF page because that's where all the cool stuff happens, including the reference to /cometd/36.0.
– snugsfbay
Jun 9 at 22:24
1
1
Thanks, I just needed to get my eyeballs pointed in the right direction. I should have been looking at the component on the VF page because that's where all the cool stuff happens, including the reference to /cometd/36.0.
– snugsfbay
Jun 9 at 22:24
Thanks, I just needed to get my eyeballs pointed in the right direction. I should have been looking at the component on the VF page because that's where all the cool stuff happens, including the reference to /cometd/36.0.
– snugsfbay
Jun 9 at 22:24
add a comment |
Thanks for contributing an answer to Salesforce Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f265257%2faccessing-systemtopic-streaming-channel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown