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?
Ability To Change Root User Password (Vulnerability?)
Proving that a Russian cryptographic standard is too structured
Could a person damage a jet airliner - from the outside - with their bare hands?
NUL delimited variable
Can you make an identity from this product?
How can powerful telekinesis avoid violating Newton's 3rd Law?
Why do radiation hardened IC packages often have long leads?
Hatch with Shading
Analogy between an unknown in an argument, and a contradiction in the principle of explosion
Command of files and size
Should I put programming books I wrote a few years ago on my resume?
Is Dumbledore a human lie detector?
How far would a landing Airbus A380 go until it stops with no brakes?
If there's something that implicates the president why is there then a national security issue? (John Dowd)
What is the Leave No Trace way to dispose of coffee grounds?
Why is the length of the Kelvin unit of temperature equal to that of the Celsius unit?
Why did Intel abandon unified CPU cache?
Is Lambda Calculus purely syntactic?
What plausible reason could I give for my FTL drive only working in space
Converting from CMYK to RGB (to work with it), then back to CMYK
How can I remove material from this wood beam?
Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?
Assigning function to function pointer, const argument correctness?
Is it possible to have 2 different but equal size real number sets that have the same mean and standard deviation?
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 9 hours ago
snugsfbaysnugsfbay
594415
594415
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.
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
1 hour ago
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.
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
1 hour ago
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.
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
1 hour ago
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 2 hours ago
answered 2 hours ago
Daniel BallingerDaniel Ballinger
75.7k16161419
75.7k16161419
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
1 hour ago
add a comment |
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
1 hour ago
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
1 hour ago
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
1 hour ago
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