Skip to content

Commit

Permalink
Remove Schema related leftovers
Browse files Browse the repository at this point in the history
Closes #1262
  • Loading branch information
d0x7 committed Dec 17, 2024
1 parent d841f65 commit c82a4f8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The service API allows you to easily build NATS services. The Service Framework

The Services Framework introduces a higher-level API for implementing services with NATS. NATS has always been a strong technology on which to build services, as they are easy to write, are location and DNS independent and can be scaled up or down by simply adding or removing instances of the service.

The Services Framework further streamlines their development by providing observability and standardization. The Service Framework allows your services to be discovered, queried for status and schema information without additional work.
The Services Framework further streamlines their development by providing observability and standardization. The Service Framework allows your services to be discovered and queried for status without additional work.

Check out the [ServiceExample](src/examples/java/io/nats/examples/service/ServiceExample.java)

Expand Down
1 change: 0 additions & 1 deletion src/main/java/io/nats/client/support/ApiConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ public interface ApiConstants {
String RESPONSE = "response";
String RETENTION = "retention";
String SAMPLE_FREQ = "sample_freq";
String SCHEMA = "schema";
String SEALED = "sealed";
String SEQ = "seq";
String SERVER_ID = "server_id";
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/io/nats/service/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public class Service {

// set up the service contexts
// ? do we need an internal dispatcher for any user endpoints
// ! also while we are here, we need to collect the endpoints for the SchemaResponse
Dispatcher dTemp = null;
serviceContexts = new HashMap<>();
for (ServiceEndpoint se : b.serviceEndpoints.values()) {
Expand All @@ -87,7 +86,7 @@ public class Service {
pingResponse = new PingResponse(id, b.name, b.version, b.metadata);
infoResponse = new InfoResponse(id, b.name, b.version, b.metadata, b.description, b.serviceEndpoints.values());

if (b.pingDispatcher == null || b.infoDispatcher == null || b.schemaDispatcher == null || b.statsDispatcher == null) {
if (b.pingDispatcher == null || b.infoDispatcher == null || b.statsDispatcher == null) {
dTemp = conn.createDispatcher();
dInternals.add(dTemp);
}
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/io/nats/service/ServiceBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class ServiceBuilder {
Duration drainTimeout = DEFAULT_DRAIN_TIMEOUT;
Dispatcher pingDispatcher;
Dispatcher infoDispatcher;
Dispatcher schemaDispatcher;
Dispatcher statsDispatcher;

/**
Expand Down Expand Up @@ -129,16 +128,6 @@ public ServiceBuilder infoDispatcher(Dispatcher infoDispatcher) {
return this;
}

/**
* Optional dispatcher for the schema service
* @param schemaDispatcher the dispatcher
* @return the ServiceBuilder
*/
public ServiceBuilder schemaDispatcher(Dispatcher schemaDispatcher) {
this.schemaDispatcher = schemaDispatcher;
return this;
}

/**
* Optional dispatcher for the stats service
* @param statsDispatcher the dispatcher
Expand Down
3 changes: 0 additions & 3 deletions src/test/java/io/nats/service/ServiceTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ public void testDispatchers() throws Exception {

Dispatcher dPing = nc.createDispatcher();
Dispatcher dInfo = nc.createDispatcher();
Dispatcher dSchema = nc.createDispatcher();
Dispatcher dStats = nc.createDispatcher();
Dispatcher dEnd = nc.createDispatcher();

Expand All @@ -424,7 +423,6 @@ public void testDispatchers() throws Exception {
.addServiceEndpoint(se1)
.pingDispatcher(dPing)
.infoDispatcher(dInfo)
.schemaDispatcher(dSchema)
.statsDispatcher(dStats)
.build();

Expand All @@ -438,7 +436,6 @@ public void testDispatchers() throws Exception {

nc.closeDispatcher(dPing);
nc.closeDispatcher(dInfo);
nc.closeDispatcher(dSchema);
sleep(100); // no rush

dispatchers = getDispatchers(nc);
Expand Down

0 comments on commit c82a4f8

Please sign in to comment.