Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Subscriber & Add setting to write events to datastore #6862

Merged
merged 5 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/main/java/io/antmedia/AppSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,10 @@ public class AppSettings implements Serializable{
private int previewQuality = 75;


/**
* Whether to write viewers(HLS, WebRTC) count to the data store, it's true by default.
* If you set it to false, it decreases the number of write operations to the data store and you don't see the viewer count in datastore
*/
@Value( "${writeStatsToDatastore:${" + SETTINGS_WRITE_STATS_TO_DATASTORE +":true}}")
private boolean writeStatsToDatastore = true;

Expand Down Expand Up @@ -2326,6 +2330,13 @@ public boolean isWriteStatsToDatastore() {
*/
@Value("${encodingQueueSize:150}")
private int encodingQueueSize = 150;

/**
* Write subscriber events to datastore. It's false by default
* Subscriber events are when they are connected/disconnected. Alternatively, you can get these events from analytics logs by default
*/
@Value("${writeSubscriberEventsToDatastore:false}")
private boolean writeSubscriberEventsToDatastore = false;

//Make sure you have a default constructor because it's populated by MongoDB
public AppSettings() {
Expand Down Expand Up @@ -4066,4 +4077,18 @@ public int getPreviewQuality() {
public void setPreviewQuality(int previewQuality) {
this.previewQuality = previewQuality;
}

/**
* @return the writeSubscriberEventsToDatastore
*/
public boolean isWriteSubscriberEventsToDatastore() {
return writeSubscriberEventsToDatastore;
}

/**
* @param writeSubscriberEventsToDatastore the writeSubscriberEventsToDatastore to set
*/
public void setWriteSubscriberEventsToDatastore(boolean writeSubscriberEventsToDatastore) {
this.writeSubscriberEventsToDatastore = writeSubscriberEventsToDatastore;
}
}
Loading
Loading