dxFeed Graal CXX API
Loading...
Searching...
No Matches
DXEndpoint Struct Reference

Manages network connections to feed or publisher. More...

#include <DXEndpoint.hpp>

Inherits RequireMakeShared< T >.

Classes

class  Builder
 Builder class for DXEndpoint that supports additional configuration properties. More...
 

Public Types

enum class  Role : std::int32_t {
  FEED , ON_DEMAND_FEED , STREAM_FEED , PUBLISHER ,
  STREAM_PUBLISHER , LOCAL_HUB
}
 Represents the role of endpoint that was specified during its creation. More...
 
enum class  State : std::int32_t { NOT_CONNECTED , CONNECTING , CONNECTED , CLOSED }
 Represents the current state of endpoint. More...
 
using Ptr = std::shared_ptr<DXEndpoint>
 The alias to a type of shared pointer to the DXEndpoint object.
 
using Unique = std::unique_ptr<DXEndpoint>
 The alias to a type of unique pointer to the DXEndpoint object.
 

Public Member Functions

Role getRole () const noexcept
 Returns the role of this endpoint.
 
State getState () const
 Returns the state of this endpoint.
 
bool isClosed () const
 
const std::string & getName () const &noexcept
 
template<typename StateChangeListener >
std::size_t addStateChangeListener (StateChangeListener &&listener) noexcept
 Adds listener that is notified about changes in state property.
 
void removeStateChangeListener (std::size_t listenerId) noexcept
 Removes listener that is notified about changes in state property.
 
SimpleHandler< void(DXEndpoint::State, DXEndpoint::State)> & onStateChange () noexcept
 Returns the onStateChange handler that can be used to add or remove listeners.
 
std::shared_ptr< DXEndpointuser (const std::string &user)
 Changes user name for this endpoint.
 
std::shared_ptr< DXEndpointpassword (const std::string &password)
 Changes password for this endpoint.
 
std::shared_ptr< DXEndpointconnect (const std::string &address)
 Connects to the specified remote address.
 
void reconnect ()
 Terminates all established network connections and initiates connecting again with the same address.
 
void disconnect ()
 Terminates all remote network connections.
 
void disconnectAndClear ()
 Terminates all remote network connections and clears stored data.
 
void close ()
 Closes this endpoint.
 
void awaitNotConnected ()
 Waits while this endpoint state becomes NOT_CONNECTED or CLOSED.
 
void awaitProcessed ()
 Waits until this endpoint stops processing data (becomes quiescent).
 
void closeAndAwaitTermination ()
 Closes this endpoint and wait until all pending data processing tasks are completed.
 
std::shared_ptr< DXFeedgetFeed ()
 
std::shared_ptr< DXPublishergetPublisher ()
 
std::string toString () const noexcept override
 Returns a string representation of the current object.
 

Static Public Member Functions

static std::shared_ptr< DXEndpointgetInstance ()
 Returns a default application-wide singleton instance of DXEndpoint with a FEED role.
 
static std::shared_ptr< DXEndpointgetInstance (Role role)
 Returns a default application-wide singleton instance of DXEndpoint for a specific role.
 
static std::shared_ptr< BuildernewBuilder ()
 Creates new Builder instance.
 
static std::shared_ptr< DXEndpointcreate ()
 Creates an endpoint with FEED role.
 
static std::shared_ptr< DXEndpointcreate (Role role)
 Creates an endpoint with a specified role.
 

Static Public Attributes

static const std::string NAME_PROPERTY = "name"
 "name"
 
static const std::string DXFEED_PROPERTIES_PROPERTY = "dxfeed.properties"
 "dxfeed.properties"
 
static const std::string DXFEED_ADDRESS_PROPERTY = "dxfeed.address"
 "dxfeed.address"
 
static const std::string DXFEED_USER_PROPERTY = "dxfeed.user"
 "dxfeed.user"
 
static const std::string DXFEED_PASSWORD_PROPERTY = "dxfeed.password"
 "dxfeed.password"
 
static const std::string DXFEED_THREAD_POOL_SIZE_PROPERTY = "dxfeed.threadPoolSize"
 "dxfeed.threadPoolSize"
 
static const std::string DXFEED_AGGREGATION_PERIOD_PROPERTY = "dxfeed.aggregationPeriod"
 "dxfeed.aggregationPeriod"
 
static const std::string DXFEED_WILDCARD_ENABLE_PROPERTY = "dxfeed.wildcard.enable"
 "dxfeed.wildcard.enable"
 
static const std::string DXPUBLISHER_PROPERTIES_PROPERTY = "dxpublisher.properties"
 "dxpublisher.properties"
 
static const std::string DXPUBLISHER_ADDRESS_PROPERTY = "dxpublisher.address"
 "dxpublisher.address"
 
static const std::string DXPUBLISHER_THREAD_POOL_SIZE_PROPERTY = "dxpublisher.threadPoolSize"
 "dxpublisher.threadPoolSize"
 
static const std::string DXENDPOINT_EVENT_TIME_PROPERTY = "dxendpoint.eventTime"
 "dxendpoint.eventTime"
 
static const std::string DXENDPOINT_STORE_EVERYTHING_PROPERTY = "dxendpoint.storeEverything"
 "dxendpoint.storeEverything"
 
static const std::string DXSCHEME_NANO_TIME_PROPERTY = "dxscheme.nanoTime"
 "dxscheme.nanoTime"
 
static const std::string DXSCHEME_ENABLED_PROPERTY_PREFIX = "dxscheme.enabled."
 "dxscheme.enabled."
 

Friends

struct OnDemandService
 

Detailed Description

Manages network connections to feed or publisher.

There are per-process (per GraalVM Isolate for now) ready-to-use singleton instances that are available with DXEndpoint::getInstance() and DXEndpoint::getInstance(Role) methods as well as factory methods DXEndpoint::create() and DXEndpoint::create(Role), and a number of configuration methods. Advanced properties can be configured using newBuilder().withProperty(key, value).build().

See DXFeed for details on how to subscribe to symbols and receive events.

Endpoint role

Each endpoint has a role that is specified on its creation and cannot be changed afterwards. The default factory method DXEndpoint::create() creates an endpoint with a FEED role. Endpoints with other roles are created with DXEndpoint::create(Role) factory method. Endpoint role is represented by DXEndpoint::Role enumeration.

Endpoint role defines the behavior of its connect method:

  • FEED connects to the remote data feed provider and is optimized for real-time or delayed data processing (this is a default role). DXEndpoint::getFeed() method returns a feed object that subscribes to this remote data feed provider and receives events from it. When event processing threads cannot keep up (don't have enough CPU time), data is dynamically conflated to minimize latency between received events and their processing time. For example:

    • DXEndpoint::create()->connect("demo.dxfeed.com:7300")->getFeed() returns a demo feed from dxFeed with sample market quotes.
    • DXEndpoint::create()->connect("localhost:7400")->getFeed() returns a feed that is connected to a publisher that is running on the same host. See example below.
    • DXEndpoint::create()->connect("file:demo-sample.data")->getFeed() returns a feed that is connected to a "demo-sample.data" file and plays back it as if it was received in real time.

    This endpoint is automatically connected to the configured data feed as explained in default properties section.

  • ON_DEMAND_FEED is similar to FEED, but it is designed to be used with OnDemandService for historical data replay only. It is configured with default properties, but is not connected automatically to the data provider until OnDemandService::replay method is invoked.
  • STREAM_FEED is similar to FEED and also connects to the remote data feed provider, but is designed for bulk parsing of data from files. DXEndpoint::getFeed() method returns feed object that subscribes to the data from the opened files and receives events from them. Events from the files are not conflated and are processed as fast as possible. Note, that in this role, DXFeed::getLastEvent() method does not work and time-series subscription is not supported. For example:
    auto feed = endpoint->getFeed();
    static std::shared_ptr< DXEndpoint > create()
    Creates an endpoint with FEED role.
    Definition DXEndpoint.cpp:447
    @ STREAM_FEED
    STREAM_FEED endpoint is similar to DXEndpoint::FEED and also connects to the remote data feed provide...
    creates a feed that is ready to read data from file as soon as the following code is invoked:
    endpoint->connect("file:demo-sample.data[speed=max]");
    "[speed=max]" clause forces to the file reader to play back all the data from "demo-sample.data" file as fast as data subscribers are processing it.
  • PUBLISHER connects to the remote publisher hub (also known as multiplexor) or creates a publisher on the local host. DXEndpoint::getPublisher() method returns a publisher object that publishes events to all connected feeds. For example: DXEndpoint->create(DXEndpoint::Role::PUBLISHER)->connect(":7400")->getPublisher() returns a publisher that is waiting for connections on TCP/IP port 7400. The published events will be delivered to all feeds that are connected to this publisher. This endpoint is automatically connected to the configured data feed as explained in default properties section.
  • LOCAL_HUB creates a local hub without ability to establish network connections. Events that are published via publisher are delivered to local feed only.

Endpoint state

Each endpoint has a state that can be retrieved with DXEndpoint::getState() method. When endpoint is created with any role and default address is not specified in default properties, then it is not connected to any remote endpoint. Its state is NOT_CONNECTED.

Feed and publisher endpoints can connect to remote endpoints of the opposite role. Connection is initiated by connect method. The endpoint state becomes CONNECTING.

When the actual connection to the remote endpoint is established, the endpoint state becomes CONNECTED.

Network connections can temporarily break and return endpoint back into CONNECTING state. File connections can be completed and return endpoint into NOT_CONNECTED state.

Connection to the remote endpoint can be terminated with DXEndpoint::disconnect() method. The endpoint state becomes NOT_CONNECTED.

Endpoint can be closed with DXEndpoint::close() method. The endpoint state becomes CLOSED. This is a final state. All connection are terminated and all internal resources that are held by this endpoint are freed. No further connections can be initiated.

Event times

The EventType::getEventTime() on received events is available only when the endpoint is created with DXEndpoint::DXENDPOINT_EVENT_TIME_PROPERTY property and the data source has embedded event times. This is typically true only for data events that are read from historical tape files (see above) and from OnDemandService. Events that are coming from a network connections do not have an embedded event time information and event time is not available for them anyway.

Default properties

Default properties are loaded from "dxfeed.properties" or "dxpublisher.properties" file depending on the role of created endpoint. "dxfeed.properties" is used for FEED and ON_DEMAND_FEED, "dxpublisher.properties" is used for PUBLISHER}. STREAM_FEED and LOCAL_HUB do not support properties file.

The location of this file can be specified using withProperty(DXFEED_PROPERTIES_PROPERTY, path) or withProperty(DXPUBLISHER_PROPERTIES_PROPERTY, path) correspondingly. When the location of this file is not explicitly specified using withProperty method, then the file path is taken from a system property with the corresponding name.

When the path to the above properties file is not provided, then a resource named "dxfeed.properties" or "dxpublisher.properties" is loaded from classpath. When classpath is set to "." (current directory), it means that the corresponding file can be placed into the current directory with any need to specify additional properties.

Defaults for individual properties can be also provided using system properties when they are not specified in the configuration file. System properties override configuration loaded from classpath resource, but don't override configuration from the user-specified configuration file.

The DXEndpoint::NAME_PROPERTY is the exception from the above rule. It is never loaded from system properties. It can be only specified in configuration file or programmatically. There is a convenience Builder.withName method for it. It is recommended to assign short and meaningful endpoint names when multiple endpoints are used in the same process (one GraalVM Isolate for now). The name of the endpoint shall describe its role in the particular application.

Note, that individual properties that are programmatically set using withProperty method always take precedence.

FEED and PUBLISHER automatically establish connection on creation when the corresponding DXEndpoint::DXFEED_ADDRESS_PROPERTY or DXEndpoint::DXPUBLISHER_ADDRESS_PROPERTY is specified.

Permanent subscription

Endpoint properties can define permanent subscription for specific sets of symbols and event types in the data feed, so that DXFeed methods like getLastEventIfSubscribed, getIndexedEventsIfSubscribed, and getTimeSeriesIfSubscribed can be used without a need to create a separate DXFeedSubscription object. Please, contact dxFeed support for details on the required configuration.

Threads and locks

This class is thread-safe and can be used concurrently from multiple threads without external synchronization.

Javadoc.

Some methods that are not marked noexcept may throw exceptions:

Exceptions
std::invalid_argumentif handle is invalid.
JavaExceptionif something happened with the dxFeed API backend
GraalExceptionif something happened with the GraalVM

Member Enumeration Documentation

◆ Role

enum class DXEndpoint::Role : std::int32_t
strong

Represents the role of endpoint that was specified during its creation.

See also
DXEndpoint
Enumerator
FEED 

FEED endpoint connects to the remote data feed provider and is optimized for real-time or delayed data processing (this is a default role).

DXEndpoint::getFeed() method returns feed object that subscribes to the remote data feed provider and receives events from it. When event processing threads cannot keep up (don't have enough CPU time), data is dynamically conflated to minimize latency between received events and their processing time.

This endpoint is automatically connected to the configured data feed as explained in default properties section.

ON_DEMAND_FEED 

ON_DEMAND_FEED endpoint is similar to DXEndpoint::FEED, but it is designed to be used with OnDemandService for historical data replay only.

It is configured with default properties, but is not connected automatically to the data provider until OnDemandService::(std::int64_t,double) "OnDemandService.replay" method is invoked.

ON_DEMAND_FEED endpoint cannot be connected to an ordinary data feed at all. OnDemandService::stopAndResume() will have a similar effect to OnDemandService::stopAndClear().

See also
OnDemandService
STREAM_FEED 

STREAM_FEED endpoint is similar to DXEndpoint::FEED and also connects to the remote data feed provider, but is designed for bulk parsing of data from files.

DXEndpoint::getFeed() method returns feed object that subscribes to the data from the opened files and receives events from them. Events from the files are not conflated, are not skipped, and are processed as fast as possible. Note, that in this role, DXFeed::getLastEvent method does not work.

PUBLISHER 

PUBLISHER endpoint connects to the remote publisher hub (also known as multiplexor) or creates a publisher on the local host.

DXEndpoint::getPublisher() method returns a publisher object that publishes events to all connected feeds. Note, that in this role, DXFeed::getLastEvent method does not work and time-series subscription is not supported.

This endpoint is automatically connected to the configured data feed as explained in default properties section.

STREAM_PUBLISHER 

STREAM_PUBLISHER endpoint is similar to DXEndpoint::PUBLISHER and also connects to the remote publisher hub, but is designed for bulk publishing of data.

DXEndpoint::getPublisher() method returns a publisher object that publishes events to all connected feeds. Published events are not conflated, are not skipped, and are processed as fast as possible. Note, that in this role, DXFeed::getLastEvent method does not work and time-series subscription is not supported.

LOCAL_HUB 

LOCAL_HUB endpoint is a local hub without ability to establish network connections.

Events that are published via publisher are delivered to local feed only.

◆ State

enum class DXEndpoint::State : std::int32_t
strong

Represents the current state of endpoint.

See also
DXEndpoint
Enumerator
NOT_CONNECTED 

Endpoint was created by is not connected to remote endpoints.

CONNECTING 

The connect method was called to establish connection to remove endpoint, but connection is not actually established yet or was lost.

CONNECTED 

The connection to remote endpoint is established.

CLOSED 

Endpoint was closed.

Member Function Documentation

◆ addStateChangeListener()

template<typename StateChangeListener >
std::size_t DXEndpoint::addStateChangeListener ( StateChangeListener && listener)
inlinenoexcept

Adds listener that is notified about changes in state property.

Installed listener can be removed by id with DXEndpoint::removeStateChangeListener method or by call onStateChange() -= id;

Template Parameters
StateChangeListenerThe listener type. It can be any callable with signature: void(State, State)
Parameters
listenerThe listener to add
Returns
the listener id

◆ awaitNotConnected()

void DXEndpoint::awaitNotConnected ( )

Waits while this endpoint state becomes NOT_CONNECTED or CLOSED.

It is a signal that any files that were opened with connect("file:...") method were finished reading, but not necessary were completely processed by the corresponding subscription listeners. Use closeAndAwaitTermination() after this method returns to make sure that all processing has completed.

This method is blocking.

Javadoc.

Exceptions
std::invalid_argument
JavaException
GraalException

◆ awaitProcessed()

void DXEndpoint::awaitProcessed ( )

Waits until this endpoint stops processing data (becomes quiescent).

This is important when writing data to file via "tape:..." connector to make sure that all published data was written before closing this endpoint.

Javadoc.

Exceptions
std::invalid_argument
JavaException
GraalException

◆ close()

void DXEndpoint::close ( )

Closes this endpoint.

All network connection are terminated as with disconnect() method and no further connections can be established.

The endpoint state immediately becomes CLOSED. All resources associated with this endpoint are released.

Javadoc.

Exceptions
std::invalid_argument
JavaException
GraalException

◆ closeAndAwaitTermination()

void DXEndpoint::closeAndAwaitTermination ( )

Closes this endpoint and wait until all pending data processing tasks are completed.

This method performs the same actions as close close(), but also awaits termination of all outstanding data processing tasks. It is designed to be used with STREAM_FEED role after awaitNotConnected() method returns to make sure that file was completely processed.

This method is blocking.

Javadoc.

Exceptions
std::invalid_argument
JavaException
GraalException

◆ connect()

std::shared_ptr< DXEndpoint > DXEndpoint::connect ( const std::string & address)

Connects to the specified remote address.

Previously established connections are closed if the new address is different from the old one. This method does nothing if address does not change or if this endpoint is CLOSED. The endpoint state immediately becomes CONNECTING otherwise.

The address string is provided with the market data vendor agreement. Use "demo.dxfeed.com:7300" for a demo quote feed.

The simplest address strings have the following format:

  • host:port to establish a TCP/IP connection.
  • :port to listen for a TCP/IP connection with a plain socket connector (good for up to a few hundred of connections).

For premium services access credentials must be configured before invocation of connect method using user and password methods.

This method does not wait until connection actually gets established. The actual connection establishment happens asynchronously after the invocation of this method. However, this method waits until notification about state transition from State::NOT_CONNECTED to State::CONNECTING gets processed by all listeners.

Javadoc.

Parameters
addressThe data source address.
Returns
this DXEndpoint.
Exceptions
std::invalid_argument
JavaExceptionif something happened with the dxFeed API backend or if address string is malformed.
GraalException

◆ create() [1/2]

std::shared_ptr< DXEndpoint > DXEndpoint::create ( )
static

Creates an endpoint with FEED role.

The result of this method is the same as create(DXEndpoint::Role::FEED). This is a shortcut to newBuilder()->build()

Returns
the created endpoint.
Exceptions
std::invalid_argument
JavaException
GraalException

◆ create() [2/2]

std::shared_ptr< DXEndpoint > DXEndpoint::create ( DXEndpoint::Role role)
static

Creates an endpoint with a specified role.

This is a shortcut to newBuilder()->withRole(role)->build()

Parameters
rolethe role.
Returns
the created endpoint.
Exceptions
std::invalid_argument
JavaException
GraalException

◆ disconnect()

void DXEndpoint::disconnect ( )

Terminates all remote network connections.

This method does nothing if this endpoint is CLOSED. The endpoint state immediately becomes NOT_CONNECTED otherwise.

This method does not release all resources that are associated with this endpoint. Use close() method to release all resources.

Javadoc.

Exceptions
std::invalid_argument
JavaException
GraalException

◆ disconnectAndClear()

void DXEndpoint::disconnectAndClear ( )

Terminates all remote network connections and clears stored data.

This method does nothing if this endpoint is CLOSED. The endpoint state immediately becomes NOT_CONNECTED otherwise.

This method does not release all resources that are associated with this endpoint. Use close() method to release all resources.

Javadoc.

Exceptions
std::invalid_argument
JavaException
GraalException

◆ getFeed()

std::shared_ptr< DXFeed > DXEndpoint::getFeed ( )
Returns
The feed that is associated with this endpoint.
Exceptions
std::invalid_argument
JavaException
GraalException

◆ getInstance() [1/2]

std::shared_ptr< DXEndpoint > DXEndpoint::getInstance ( )
static

Returns a default application-wide singleton instance of DXEndpoint with a FEED role.

Most applications use only a single data-source and should rely on this method to get one. This method creates an endpoint on the first use with a default configuration as explained in default properties section of DXEndpoint class documentation. You can provide configuration via system properties as explained there.

This is a shortcut to getInstance(DXEndpoint::Role::FEED).

See also
DXEndpoint::getInstance(Role)
Exceptions
std::invalid_argument
JavaException
GraalException

◆ getInstance() [2/2]

std::shared_ptr< DXEndpoint > DXEndpoint::getInstance ( DXEndpoint::Role role)
static

Returns a default application-wide singleton instance of DXEndpoint for a specific role.

Most applications use only a single data-source and should rely on this method to get one. This method creates an endpoint with the corresponding role on the first use with a default configuration as explained in default properties section of DXEndpoint class documentation. You can provide configuration via system properties as explained there.

The configuration does not have to include an address. You can use connect(address) and DXEndpoint::disconnect() methods on the instance that is returned by this method to programmatically establish and tear-down connection to a user-provided address.

If you need a fully programmatic configuration and/or multiple endpoints of the same role in your application, then create a custom instance of DXEndpoint with DXEndpoint::newBuilder() method, configure it, and use Builder::build() method.

Parameters
roleThe role of DXEndpoint instance
Returns
The DXEndpoint instance
Exceptions
std::invalid_argument
JavaException
GraalException

◆ getName()

const std::string & DXEndpoint::getName ( ) const &
noexcept
Returns
The user defined endpoint's name

◆ getPublisher()

std::shared_ptr< DXPublisher > DXEndpoint::getPublisher ( )
Returns
The publisher that is associated with this endpoint.
Exceptions
std::invalid_argument
JavaException
GraalException

◆ getRole()

DXEndpoint::Role DXEndpoint::getRole ( ) const
noexcept

Returns the role of this endpoint.

Returns
the role.
See also
DXEndpoint

◆ getState()

DXEndpoint::State DXEndpoint::getState ( ) const

Returns the state of this endpoint.

Returns
the state.
See also
DXEndpoint
Exceptions
std::invalid_argument
JavaException
GraalException

◆ isClosed()

bool DXEndpoint::isClosed ( ) const
Returns
true if the endpoint is closed
Exceptions
std::invalid_argument
JavaException
GraalException

◆ newBuilder()

std::shared_ptr< DXEndpoint::Builder > DXEndpoint::newBuilder ( )
static

Creates new Builder instance.

Use Builder::build() to build an instance of DXEndpoint when all configuration properties were set.

Returns
the created endpoint builder.
Exceptions
std::invalid_argument
JavaException
GraalException

◆ onStateChange()

SimpleHandler< void(DXEndpoint::State, DXEndpoint::State)> & DXEndpoint::onStateChange ( )
noexcept

Returns the onStateChange handler that can be used to add or remove listeners.

Returns
onStateChange handler with void(State, State) signature

◆ password()

std::shared_ptr< DXEndpoint > DXEndpoint::password ( const std::string & password)

Changes password for this endpoint.

This method shall be called before connect together with user to configure service access credentials.

Parameters
passwordThe password.
Returns
this DXEndpoint.
Exceptions
std::invalid_argument
JavaException
GraalException

◆ reconnect()

void DXEndpoint::reconnect ( )

Terminates all established network connections and initiates connecting again with the same address.

The effect of the method is alike to invoking disconnect() and connect(const std::string&) with the current address, but internal resources used for connections may be reused by implementation. TCP connections with multiple target addresses will try switch to an alternative address, configured reconnect timeouts will apply.

Note: The method will not connect endpoint that was not initially connected with connect(const std::string&) method or was disconnected with disconnect() method.

The method initiates a short-path way for reconnecting, so whether observers will have a chance to see an intermediate state State::NOT_CONNECTED depends on the implementation.

Javadoc.

Exceptions
std::invalid_argument
JavaException
GraalException

◆ removeStateChangeListener()

void DXEndpoint::removeStateChangeListener ( std::size_t listenerId)
noexcept

Removes listener that is notified about changes in state property.

It removes the listener that was previously installed with DXEndpoint::addStateChangeListener method.

Parameters
listenerIdThe listener id to remove

◆ toString()

std::string DXEndpoint::toString ( ) const
overridevirtualnoexcept

Returns a string representation of the current object.

Returns
a string representation

Reimplemented from SharedEntity.

◆ user()

std::shared_ptr< DXEndpoint > DXEndpoint::user ( const std::string & user)

Changes user name for this endpoint.

This method shall be called before connect together with password to configure service access credentials.

Parameters
userThe user name.
Returns
this DXEndpoint.
Exceptions
std::invalid_argument
JavaException
GraalException

Member Data Documentation

◆ DXENDPOINT_EVENT_TIME_PROPERTY

const std::string DXEndpoint::DXENDPOINT_EVENT_TIME_PROPERTY = "dxendpoint.eventTime"
static

"dxendpoint.eventTime"

Set this property to true to enable event time support. By default, the endpoint does not support event time.

The event time is available only when the corresponding DXEndpoint is created with this property and the data source has embedded event times. This is typically true only for data events that are read from historical tape files and from OnDemandService. Events that are coming from a network connections do not have an embedded event time information and event time is not available for them anyway.

Use this property if you need to work with historical data coming from files or from OnDemandService or writing data with times to file via DXPublisher using "tape:..." address.

◆ DXENDPOINT_STORE_EVERYTHING_PROPERTY

const std::string DXEndpoint::DXENDPOINT_STORE_EVERYTHING_PROPERTY = "dxendpoint.storeEverything"
static

"dxendpoint.storeEverything"

Set this property to to store all lasting and indexed events even when there is no subscription on them. By default, the endpoint stores only events from subscriptions. It works in the same way both for DXFeed and DXPublisher.

Use this property with extreme care, since API does not currently provide any means to remove those events from the storage and there might be an effective memory leak if the spaces of symbols on which events are published grows without bound.

◆ DXFEED_ADDRESS_PROPERTY

const std::string DXEndpoint::DXFEED_ADDRESS_PROPERTY = "dxfeed.address"
static

"dxfeed.address"

Defines default connection address for an endpoint with role FEED or ON_DEMAND_FEED. Connection is established to this address by role FEED as soon as endpoint is created, while role ON_DEMAND_FEED waits until OnDemandService::(std::int64_t,double) is invoked before connecting.

By default, without this property, connection is not established until connect(address) is invoked.

Credentials for access to premium services may be configured with DXEndpoint::DXFEED_USER_PROPERTY and DXEndpoint::DXFEED_PASSWORD_PROPERTY.

See also
Builder::withProperty(const std::string&, const std::string&)

◆ DXFEED_AGGREGATION_PERIOD_PROPERTY

const std::string DXEndpoint::DXFEED_AGGREGATION_PERIOD_PROPERTY = "dxfeed.aggregationPeriod"
static

"dxfeed.aggregationPeriod"

Defines data aggregation period an endpoint with role FEED that limits the rate of data notifications. For example, setting the value of this property to "0.1s" limits notification to once every 100ms (at most 10 per second).

See also
Builder::withProperty(const std::string&, const std::string&)

◆ DXFEED_PASSWORD_PROPERTY

const std::string DXEndpoint::DXFEED_PASSWORD_PROPERTY = "dxfeed.password"
static

"dxfeed.password"

Defines default password for an endpoint with role FEED or ON_DEMAND_FEED.

See also
DXEndpoint::password(const std::string&)

◆ DXFEED_PROPERTIES_PROPERTY

const std::string DXEndpoint::DXFEED_PROPERTIES_PROPERTY = "dxfeed.properties"
static

"dxfeed.properties"

Defines path to a file with properties for an endpoint with role FEED or ON_DEMAND_FEED. By default, properties a loaded from a path resource named "dxfeed.properties".

See also
Builder::withProperty(const std::string&, const std::string&)

◆ DXFEED_THREAD_POOL_SIZE_PROPERTY

const std::string DXEndpoint::DXFEED_THREAD_POOL_SIZE_PROPERTY = "dxfeed.threadPoolSize"
static

"dxfeed.threadPoolSize"

Defines thread pool size for an endpoint with role FEED. By default, the thread pool size is equal to the number of available processors.

See also
Builder::withProperty(const std::string&, const std::string&)

◆ DXFEED_USER_PROPERTY

const std::string DXEndpoint::DXFEED_USER_PROPERTY = "dxfeed.user"
static

"dxfeed.user"

Defines default user name for an endpoint with role FEED or ON_DEMAND_FEED.

See also
DXEndpoint::user(const std::string&)

◆ DXFEED_WILDCARD_ENABLE_PROPERTY

const std::string DXEndpoint::DXFEED_WILDCARD_ENABLE_PROPERTY = "dxfeed.wildcard.enable"
static

"dxfeed.wildcard.enable"

Set this property to true to turns on wildcard support. By default, the endpoint does not support wildcards. This property is needed for WildcardSymbol support and for the use of "tape:..." address in DXPublisher.

◆ DXPUBLISHER_ADDRESS_PROPERTY

const std::string DXEndpoint::DXPUBLISHER_ADDRESS_PROPERTY = "dxpublisher.address"
static

"dxpublisher.address"

Defines default connection address for an endpoint with role PUBLISHER. Connection is established to this address as soon as endpoint is created. By default, connection is not established until DXEndpoint::connect(const std::string&) is invoked.

See also
Builder::withProperty(const std::string&, const std::string&)

◆ DXPUBLISHER_PROPERTIES_PROPERTY

const std::string DXEndpoint::DXPUBLISHER_PROPERTIES_PROPERTY = "dxpublisher.properties"
static

"dxpublisher.properties"

Defines path to a file with properties for an endpoint with role PUBLISHER. By default, properties a loaded from a classpath resource named "dxpublisher.properties".

See also
Builder::withProperty(const std::string&, const std::string&)

◆ DXPUBLISHER_THREAD_POOL_SIZE_PROPERTY

const std::string DXEndpoint::DXPUBLISHER_THREAD_POOL_SIZE_PROPERTY = "dxpublisher.threadPoolSize"
static

"dxpublisher.threadPoolSize"

Defines thread pool size for an endpoint with role PUBLISHER. By default, the thread pool size is equal to the number of available processors.

See also
Builder::withProperty(const std::string&, const std::string&)

◆ DXSCHEME_ENABLED_PROPERTY_PREFIX

const std::string DXEndpoint::DXSCHEME_ENABLED_PROPERTY_PREFIX = "dxscheme.enabled."
static

"dxscheme.enabled."

Defines whether a specified field from the scheme should be enabled instead of it's default behaviour. Use it according to following format:
dxscheme.enabled.<field_property_name>=<event_name_mask_glob>

For example, dxscheme.enabled.TimeNanoPart=Trade enables NanoTimePart internal field only in Trade events.

There is a shortcut for turning on nano-time support using DXEndpoint::DXSCHEME_NANO_TIME_PROPERTY.

◆ DXSCHEME_NANO_TIME_PROPERTY

const std::string DXEndpoint::DXSCHEME_NANO_TIME_PROPERTY = "dxscheme.nanoTime"
static

"dxscheme.nanoTime"

Set this property to true to turn on nanoseconds precision business time. By default, this feature is turned off. Business time in most events is available with millisecond precision by default, while Quote events business time is available with seconds precision.

This method provides a higher-level control than turning on individual properties that are responsible for nano-time via DXEndpoint::DXSCHEME_ENABLED_PROPERTY_PREFIX. The later can be used to override of fine-time nano-time support for individual fields. Setting this property to true is essentially equivalent to setting:

dxscheme.enabled.Sequence=*
dxscheme.enabled.TimeNanoPart=*

◆ NAME_PROPERTY

DXFCPP_BEGIN_NAMESPACE const std::string DXEndpoint::NAME_PROPERTY = "name"
static

"name"

Defines property for endpoint name that is used to distinguish multiple endpoints in the same process in logs and in other diagnostic means. Use Builder::withProperty(const std::string&, const std::string&) method. This property is also changed by Builder::withName(const std::string&) method.