{
  "id" : "mod-pubsub-2.3.3",
  "name" : "Pubsub",
  "requires" : [ {
    "id" : "users",
    "version" : "15.1"
  }, {
    "id" : "login",
    "version" : "6.0 7.0"
  }, {
    "id" : "permissions",
    "version" : "5.2"
  } ],
  "provides" : [ {
    "id" : "pubsub-event-types",
    "version" : "0.1",
    "handlers" : [ {
      "methods" : [ "GET" ],
      "pathPattern" : "/pubsub/event-types",
      "permissionsRequired" : [ "pubsub.event-types.get" ]
    }, {
      "methods" : [ "POST" ],
      "pathPattern" : "/pubsub/event-types",
      "permissionsRequired" : [ "pubsub.event-types.post" ]
    }, {
      "methods" : [ "GET" ],
      "pathPattern" : "/pubsub/event-types/{eventTypeName}",
      "permissionsRequired" : [ "pubsub.event-types.get" ]
    }, {
      "methods" : [ "PUT" ],
      "pathPattern" : "/pubsub/event-types/{eventTypeName}",
      "permissionsRequired" : [ "pubsub.event-types.put" ]
    }, {
      "methods" : [ "DELETE" ],
      "pathPattern" : "/pubsub/event-types/{eventTypeName}",
      "permissionsRequired" : [ "pubsub.event-types.delete" ]
    } ]
  }, {
    "id" : "pubsub-publishers",
    "version" : "0.1",
    "handlers" : [ {
      "methods" : [ "POST" ],
      "pathPattern" : "/pubsub/event-types/declare/publisher",
      "permissionsRequired" : [ "pubsub.publishers.post" ]
    }, {
      "methods" : [ "DELETE" ],
      "pathPattern" : "/pubsub/event-types/{eventTypeName}/publishers",
      "permissionsRequired" : [ "pubsub.publishers.delete" ]
    }, {
      "methods" : [ "GET" ],
      "pathPattern" : "/pubsub/event-types/{eventTypeName}/publishers",
      "permissionsRequired" : [ "pubsub.publishers.get" ]
    } ]
  }, {
    "id" : "pubsub-subscribers",
    "version" : "0.1",
    "handlers" : [ {
      "methods" : [ "POST" ],
      "pathPattern" : "/pubsub/event-types/declare/subscriber",
      "permissionsRequired" : [ "pubsub.subscribers.post" ]
    }, {
      "methods" : [ "DELETE" ],
      "pathPattern" : "/pubsub/event-types/{eventTypeName}/subscribers",
      "permissionsRequired" : [ "pubsub.subscribers.delete" ]
    }, {
      "methods" : [ "GET" ],
      "pathPattern" : "/pubsub/event-types/{eventTypeName}/subscribers",
      "permissionsRequired" : [ "pubsub.subscribers.get" ]
    } ]
  }, {
    "id" : "pubsub-audit",
    "version" : "0.1",
    "handlers" : [ {
      "methods" : [ "GET" ],
      "pathPattern" : "/pubsub/history",
      "permissionsRequired" : [ "pubsub.audit.history.get" ]
    }, {
      "methods" : [ "GET" ],
      "pathPattern" : "/pubsub/audit-messages/{eventId}/payload",
      "permissionsRequired" : [ "pubsub.audit.message.payload.get" ]
    } ]
  }, {
    "id" : "pubsub-publish",
    "version" : "0.1",
    "handlers" : [ {
      "methods" : [ "POST" ],
      "pathPattern" : "/pubsub/publish",
      "permissionsRequired" : [ "pubsub.publish.post" ]
    } ]
  }, {
    "id" : "pubsub-messaging-modules",
    "version" : "0.1",
    "handlers" : [ {
      "methods" : [ "DELETE" ],
      "pathPattern" : "/pubsub/messaging-modules",
      "permissionsRequired" : [ "pubsub.messaging-modules.delete" ]
    } ]
  }, {
    "id" : "_tenant",
    "version" : "2.0",
    "interfaceType" : "system",
    "handlers" : [ {
      "methods" : [ "POST" ],
      "pathPattern" : "/_/tenant",
      "modulePermissions" : [ "users.collection.get", "users.item.post", "users.item.put", "login.item.post", "perms.users.item.post" ]
    }, {
      "methods" : [ "DELETE", "GET" ],
      "pathPattern" : "/_/tenant/{id}"
    } ]
  } ],
  "permissionSets" : [ {
    "permissionName" : "pubsub.event-types.get",
    "displayName" : "PubSub - get Event Descriptor",
    "description" : "Get Event Descriptor"
  }, {
    "permissionName" : "pubsub.event-types.post",
    "displayName" : "PubSub - create new Event Type",
    "description" : "Post Event Descriptor"
  }, {
    "permissionName" : "pubsub.event-types.put",
    "displayName" : "PubSub - update Event Descriptor for Event Type",
    "description" : "Put Event Descriptor"
  }, {
    "permissionName" : "pubsub.event-types.delete",
    "displayName" : "PubSub - delete Event Type",
    "description" : "Delete Event Descriptor"
  }, {
    "permissionName" : "pubsub.publishers.post",
    "displayName" : "PubSub - declare publisher",
    "description" : "Post Publisher Descriptor"
  }, {
    "permissionName" : "pubsub.publishers.delete",
    "displayName" : "PubSub - delete publisher declaration",
    "description" : "Delete Publisher"
  }, {
    "permissionName" : "pubsub.publishers.get",
    "displayName" : "PubSub - get publishers",
    "description" : "Get Publishers"
  }, {
    "permissionName" : "pubsub.subscribers.post",
    "displayName" : "PubSub - declare subscriber",
    "description" : "Post Subscriber Descriptor"
  }, {
    "permissionName" : "pubsub.subscribers.delete",
    "displayName" : "PubSub - delete subscriber declaration",
    "description" : "Delete Subscriber"
  }, {
    "permissionName" : "pubsub.subscribers.get",
    "displayName" : "PubSub - get subscribers",
    "description" : "Get Subscribers"
  }, {
    "permissionName" : "pubsub.audit.history.get",
    "displayName" : "PubSub - get history",
    "description" : "Get history"
  }, {
    "permissionName" : "pubsub.audit.message.payload.get",
    "displayName" : "PubSub - get audit message payload",
    "description" : "Get audit message payload"
  }, {
    "permissionName" : "pubsub.publish.post",
    "displayName" : "PubSub - publish event",
    "description" : "Publish event"
  }, {
    "permissionName" : "pubsub.messaging-modules.delete",
    "displayName" : "PubSub - delete publishers and subscribers declarations",
    "description" : "Delete publishers or subscribers"
  }, {
    "permissionName" : "pubsub.events.post",
    "replaces" : [ "source-storage.events.post", "source-records-manager.events.post", "inventory.events.post", "circulation.events.post", "patron-blocks.events.post", "audit-data.events.post" ],
    "displayName" : "PubSub - post event.",
    "description" : "Post all events."
  } ],
  "launchDescriptor" : {
    "dockerImage" : "folioorg/mod-pubsub:2.3.3",
    "dockerPull" : true,
    "env" : [ {
      "name" : "JAVA_OPTIONS",
      "value" : "-XX:MaxRAMPercentage=66.0 -XX:+HeapDumpOnOutOfMemoryError"
    }, {
      "name" : "DB_HOST",
      "value" : "postgres"
    }, {
      "name" : "DB_PORT",
      "value" : "5432"
    }, {
      "name" : "DB_USERNAME",
      "value" : "folio_admin"
    }, {
      "name" : "DB_PASSWORD",
      "value" : "folio_admin"
    }, {
      "name" : "DB_DATABASE",
      "value" : "okapi_modules"
    }, {
      "name" : "DB_QUERYTIMEOUT",
      "value" : "60000"
    }, {
      "name" : "DB_CHARSET",
      "value" : "UTF-8"
    }, {
      "name" : "DB_MAXPOOLSIZE",
      "value" : "5"
    }, {
      "name" : "KAFKA_HOST",
      "value" : "10.0.2.15"
    }, {
      "name" : "KAFKA_PORT",
      "value" : "9092"
    }, {
      "name" : "OKAPI_URL",
      "value" : "http://10.0.2.15:9130"
    }, {
      "name" : "SYSTEM_USER_NAME",
      "value" : "pub-sub"
    }, {
      "name" : "SYSTEM_USER_PASSWORD",
      "value" : "pubsub"
    } ],
    "dockerArgs" : {
      "HostConfig" : {
        "Memory" : 1073741824,
        "PortBindings" : {
          "8081/tcp" : [ {
            "HostPort" : "%p"
          } ]
        }
      }
    }
  }
}