Skip to content

Instantly share code, notes, and snippets.

@choudharymanish8585
Last active August 21, 2018 09:58
Show Gist options
  • Save choudharymanish8585/770ff25038c330cd2603ddbbfd53b0b1 to your computer and use it in GitHub Desktop.
Save choudharymanish8585/770ff25038c330cd2603ddbbfd53b0b1 to your computer and use it in GitHub Desktop.
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global" >
<!--Include StreamingApiHandler child component and pass channel name to subscribe
ex: "/topic/AccountSpy" is my pushtopic channel name
once the event is fired, it will handled in handleMessage controller method -->
<c:StreamingAPIHandler channelName="/topic/AccountSpy" onStreamEvent="{!c.handleMessage}" />
<lightning:card footer="Please check browser console for latest captured event"
title="Account Spy"
iconName="standard:search">
<p class="slds-p-horizontal_small">
This is blank component to demonstrate streaming api usage in lightning component.
</p>
</lightning:card>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment